In California, the emissions test (aka SMOG test) is performed with a combination of instruments: ODB-ii reader, tail pipe exhaust gas analysis, and rolling road.
There is no assumption that your car will pass emissions if there are no ODB faults or codes.
ODB is read to validate that the car's emission systems are in working order not prove that the car is not polluting. Any error codes from the ODB reader are recorded and if those are for any part of the engine or exhaust system, then the test is an automatic fail. If you had any of those codes, you'd probably already have a check engine light illuminated on your dashboard. If that were the case, you wouldn't even have the rest of the test performed.
The real test is performed with the ODB reader and exhaust reader hooked to a computer while the car is "driven" on a rolling road. The readings from ODB are used to verify that the engine is put through the required load (typically first at idle and then 25-30mph) with the measurements from the gas analyzer correlated to the vehicle speed, engine temperatures, etc. As long as both the gas analysis and ODB result in valid and are within allowable output tolerances, then your vehicle will pass.
The allowable emissions depend on the year of the engine manufacture, so if you swap engines your emissions requirements may change. As regulations become more restrictive on emissions, newer cars emit less and have less variance in what they may emit. Older cars are only expected to meet the emissions standards from when they were manufactured. Cars made before 1974 are test exempt, unless you put a newer engine in the car. So, if you put a 2016 Chevy LS crate engine into your 1920 Duesenberg, you'll now need to get your Duesenberg SMOG checked.