def teardown_method(self, meth): self.space.appexec([], """(): import sys for name in ['re_py_subsrc', 're_python_pysrc']: if name in sys.modules: del sys.modules[name] """) _clean_cache(self.space)
def teardown_method(self, meth): if hasattr(self.space, '_cleanup_ffi'): for ffi in self.space._cleanup_ffi: del ffi.cached_types # try to prevent cycles del self.space._cleanup_ffi self.space.appexec([self._w_modules], """(old_modules): import sys for key in list(sys.modules.keys()): if key not in old_modules: del sys.modules[key] """) _clean_cache(self.space)
def teardown_method(self, method): _clean_cache(self.space)
def teardown_method(self, method): UniqueCache.for_testing = False _clean_cache(self.space)
def teardown_method(self, meth): _clean_cache(self.space)