The CEL turning off just means the problem that set the code has not been detected for a few drive cycles. It doesn't necessarily mean that all is well or that the problem has gone away forever. Also the code is still in memory so if you went for inspection even with the CEL off you'd still fail (assuming the requirements for OBDII in your state are similar to NY).