You can clear the codes but I dont think they would be gone long enough to complete the testing without coming back on. I tried to do a battery disconnect on my old Ranger due to a bad 02 sensor and it came back on pretty quick, quick enough for the inspection guy to give me a "really, guy" look and me to