From eba5130e4f3254e5722b09421224cd86d6d9aca8 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Wed, 21 Mar 2001 03:58:16 +0000 Subject: Addrf simple test that import is case-sensitive. --- Lib/test/test_import.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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" -- cgit v0.12