[Python-checkins] r73899 - python/trunk/Lib/test/test_import.py

r.david.murray python-checkins at python.org
Thu Jul 9 03:43:42 CEST 2009


Author: r.david.murray
Date: Thu Jul  9 03:43:41 2009
New Revision: 73899

Log:
Conditionalize test cleanup code to eliminate traceback, which will
hopefully reveal the real problem.


Modified:
   python/trunk/Lib/test/test_import.py

Modified: python/trunk/Lib/test/test_import.py
==============================================================================
--- python/trunk/Lib/test/test_import.py	(original)
+++ python/trunk/Lib/test/test_import.py	Thu Jul  9 03:43:41 2009
@@ -107,7 +107,7 @@
                               stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH)
         finally:
             remove_files(TESTFN)
-            del sys.modules[TESTFN]
+            if TESTFN in sys.modules: del sys.modules[TESTFN]
 
     def testImpModule(self):
         # Verify that the imp module can correctly load and find .py files


More information about the Python-checkins mailing list