mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue