diff options
Diffstat (limited to 'Lib/test/test_import.py')
-rw-r--r-- | Lib/test/test_import.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index 9c2f16f..a151def 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -1,9 +1,18 @@ -from test_support import TESTFN +from test_support import TESTFN, TestFailed import os import random import sys +# Brief digression to test that import is case-sensitive: if we got this +# far, we know for sure that "random" exists. +try: + import RAnDoM +except ImportError: + pass +else: + raise TestFailed("import of RAnDoM should have failed (case mismatch)") + sys.path.insert(0, os.curdir) source = TESTFN + ".py" |