mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Addrf simple test that import is case-sensitive.
This commit is contained in:
parent
9de05f4157
commit
eba5130e4f
1 changed files with 10 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue