[Python-checkins] r85996 - python/branches/py3k/Lib/test/test_import.py

benjamin.peterson python-checkins at python.org
Sun Oct 31 01:06:57 CEST 2010


Author: benjamin.peterson
Date: Sun Oct 31 01:06:57 2010
New Revision: 85996
Log:
close open file from find_module()
Modified:
 python/branches/py3k/Lib/test/test_import.py
Modified: python/branches/py3k/Lib/test/test_import.py
==============================================================================
--- python/branches/py3k/Lib/test/test_import.py	(original)
+++ python/branches/py3k/Lib/test/test_import.py	Sun Oct 31 01:06:57 2010
@@ -128,6 +128,7 @@
 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)


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /