From: Tim Peters Date: Wed, 21 Mar 2001 03:58:16 +0000 (+0000) Subject: Addrf simple test that import is case-sensitive. X-Git-Tag: v2.1b2~122 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eba5130e4f3254e5722b09421224cd86d6d9aca8;p=thirdparty%2FPython%2Fcpython.git Addrf simple test that import is case-sensitive. --- diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index 9c2f16f1ff52..a151defa21ca 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"