A pending trouble code should not cause your vehicle to fail the smog check. We say "should" because smog technicians have reported, and for unknown reasons, that they've had vehicles fail the smog test with only a pending trouble code(s). This is not the norm and 99.9% of the time a vehicle passes the smog test with a pending OBDII trouble code(s).
The smog test process (for 2000 & newer vehicles) relies on your vehicle's computer having determined an emission fault being present or not; this being indicated by an illuminated (ON) check engine light or malfunction indicator lamp.
Pending trouble codes do not turn on the check engine light because the engine control computer has not yet determined, for certain, that the engine has a fault. The computer has noticed a "possible" problem with the emissions system but needs to gather further data before being certain. For 1996 to 1999 model vehicles both trouble codes and exhaust emissions are checked. 2000 & newer vehicles are only checked for trouble codes (no exhaust emission testing).
Trouble codes which have both Pending and Hard status are referred to as two-trip trouble codes. This means the computer has to run a specific test twice before it determines a true fault exists; and before it turns on the check engine light, alerting the driver of an emissions problem. As such, the smog machine also can not determine (and subsequently fail the vehicle) whether an actual emission fault exists until the vehicle's engine control computer turns on the check engine light.