def tearDown(self): tempfile.tempdir = None # Since we're executing the module-under-test several times # from the same process, we must clear the exports registry # between invocations. clear_export_registry()