[Python-checkins] cpython (2.7): Issue #7732: Try to fix the a failing test on Windows
victor.stinner
python-checkins at python.org
Mon Nov 14 20:49:10 CET 2011
http://hg.python.org/cpython/rev/555871844962
changeset: 73550:555871844962
branch: 2.7
parent: 73545:3c3009f63700
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Mon Nov 14 20:50:36 2011 +0100
summary:
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.
files:
Lib/test/test_import.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -269,7 +269,8 @@
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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list