Skip to content

Commit 8c005b9

Browse files
jmcgeheeivmrbean-bremen
authored andcommitted
Clarify dereferencing comment in DynamicPatcher
1 parent 1abb64c commit 8c005b9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pyfakefs/fake_filesystem_unittest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,9 @@ def cleanup(self):
667667
reload(module)
668668
reloaded_module_names = [module.__name__
669669
for module in self._patcher.modules_to_reload]
670-
# force all modules loaded during the test to reload on next use,
671-
# to ensure that no faked modules are still hold in these modules
670+
# Dereference all modules loaded during the test so they will reload on
671+
# the next use, ensuring that no faked modules are referenced after the
672+
# test.
672673
for name in self._loaded_module_names:
673674
if name in sys.modules and name not in reloaded_module_names:
674675
del sys.modules[name]

0 commit comments

Comments
 (0)