diff options
-rw-r--r-- | Lib/test/test_import.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index 10b32d3..02f56e6 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -128,6 +128,7 @@ class ImportTests(unittest.TestCase): orig_getenv = os.getenv with EnvironmentVarGuard(): x = imp.find_module("os") + self.addCleanup(x[0].close) new_os = imp.load_module("os", *x) self.assertIs(os, new_os) self.assertIs(orig_path, new_os.path) |