mirror of https://github.com/python/cpython
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.
This commit is contained in:
parent
0f1571ce7f
commit
16ed86831b
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue