The problem here is with "Emissions Readiness Monitors".
If you clear your codes (aka, flash or reset your ECM) just before getting your inspection,
you'll still fail.
Emissions readiness monitors were implemented just prior to ODB2 standardization in 1996. It all started due to people simply unplugging the bulb that lit up the CEL light on the dash and passing inspection. Later on, people had found that if you flash the computer just before going in, your CEL would go away, and as long as your inspection station didn't drive your car 100 miles (when the CEL would go back on, still noticing a problem) then you'd still pass.
The readiness monitors are timers that require varied driving styles, speeds, and duty cycles. It's not like "30 miles later, all your readiness monitors will be ready" ... they do a more thorough check of the O2 sensors and other evap and emissions testing during both closed loop and open loop scenarios, over several hundreds of miles. Readiness monitors have 3 modes... "ready", "not ready" and "fail". The fails usually also result in a DTC being set and the CEL light being illuminated.
The only way to get rid of it and legally pass inspection is either:
- remove your headers for the inspection, re-install afterward.

- Tune the car to not look at the rear o2 sensors. This would reset those readiness sensors to "ready" since they would no longer be included in the loop of what the readiness sensor is designed to do.
Sorry to say it, but that's the way it is. Good luck working to resolve this. I just thought I'd save you the headache and expense of resetting the ECM just prior to getting your inspection, only to find you default/failed because none of your readiness monitors were in the ready state yet. Now you have usually 10 days to make it right or they pull your existing inspection sticker and you can't drive the car. At least this is how it is in most states, from what I remember.
Hope this helps...
--zepcom