Conditionalize test cleanup code to eliminate traceback, which will

hopefully reveal the real problem.
This commit is contained in:
R. David Murray 2009-07-09 01:43:41 +00:00
parent 42b145d0e2
commit 8a624a9eb0
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ class ImportTest(unittest.TestCase):
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