Kaydet (Commit) 16ed8683 authored tarafından Victor Stinner's avatar Victor Stinner

Issue #7732: Try to fix the a failing test on Windows

It doesn't matter if imp.find_module() fails with ImportError or IOError, but
it should not crash.
üst 0f1571ce
......@@ -269,7 +269,8 @@ class ImportTests(unittest.TestCase):
source = TESTFN + '.py'
os.mkdir(source)
try:
self.assertRaises(IOError, imp.find_module, TESTFN, ["."])
self.assertRaises((ImportError, IOError),
imp.find_module, TESTFN, ["."])
finally:
os.rmdir(source)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment