Stored faults shouldn’t matter, only current or active faults, if the check engine light is not on and the monitors have passed the vehicle should pass inspection.
In my state an inspection certificate is good for 90 days, I complete my inspections 30 to 45 days in advance, others wait until the last day.