summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-10-30 23:04:49 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-10-30 23:04:49 (GMT)
commit1c87e2943af7eac9971183734fc07190a1a65d65 (patch)
treec3f0b66fe099ca535f3094eb68c0f53c8129b476
parent0bbf9c99d6c871150ae41f0144ed404aa4ff318f (diff)
downloadcpython-1c87e2943af7eac9971183734fc07190a1a65d65.zip
cpython-1c87e2943af7eac9971183734fc07190a1a65d65.tar.gz
cpython-1c87e2943af7eac9971183734fc07190a1a65d65.tar.bz2
condense
-rw-r--r--Lib/test/test_import.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index 386ec61..10b32d3 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -36,12 +36,8 @@ class ImportTests(unittest.TestCase):
def test_case_sensitivity(self):
# Brief digression to test that import is case-sensitive: if we got
# this far, we know for sure that "random" exists.
- try:
+ with self.assertRaises(ImportError):
import RAnDoM
- except ImportError:
- pass
- else:
- self.fail("import of RAnDoM should have failed (case mismatch)")
def test_double_const(self):
# Another brief digression to test the accuracy of manifest float