diff --git a/pyfakefs/fake_filesystem_unittest.py b/pyfakefs/fake_filesystem_unittest.py index 50665d0b..ece2dd8c 100644 --- a/pyfakefs/fake_filesystem_unittest.py +++ b/pyfakefs/fake_filesystem_unittest.py @@ -1098,8 +1098,8 @@ def cleanup(self) -> None: # in the unlikely case that the cache is turned off, # we have to reload all modules # if not self._patcher.use_cache or name in Patcher.CACHED_MODULES: - # reload(sys.modules[name]) - del sys.modules[name] + reload(sys.modules[name]) + # del sys.modules[name] def needs_patch(self, name: str) -> bool: """Check if the module with the given name shall be replaced."""