As for "Extreme Makeover: Home Edition"...
Yes, many of the inspections are planned weeks, if not months, in advance. Since the building/remodeling of the new homes is on a very strict(!) timetable, that allows the producers of the show to give an exact window of time for the inspections to the proper authorities. -Unlike under "normal" circumstances where an inspection can't be scheduled until the structure is ready - which, under "normal" circumstances, is never on schedule.

On other thing to keep in mind - Just because the house was ready for the on-camera reveal, does not mean it was ready to be moved into immediately after the taping.