Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a3d056ed
Commit
a3d056ed
authored
Apr 02, 2009
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check that on a platform that is expected to have a case-insensitive filesystem
that is in fact the case. Closes issue #5442.
parent
bd25d337
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
Lib/importlib/test/util.py
Lib/importlib/test/util.py
+8
-1
No files found.
Lib/importlib/test/util.py
View file @
a3d056ed
from
contextlib
import
contextmanager
import
imp
import
os.path
from
test
.support
import
unlink
from
test
import
support
import
unittest
import
sys
...
...
@@ -10,6 +10,13 @@ def case_insensitive_tests(class_):
"""Class decorator that nullifies tests that require a case-insensitive
file system."""
if
sys
.
platform
not
in
(
'win32'
,
'darwin'
,
'cygwin'
):
original_name
=
os
.
path
.
listdir
(
'.'
)[
0
]
if
name
.
upper
()
!=
name
:
changed_name
=
name
.
upper
()
else
:
changed_name
=
name
.
lower
()
if
os
.
path
.
exists
(
changed_name
):
return
class_
return
unittest
.
TestCase
else
:
return
class_
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment