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
5e99731a
Commit
5e99731a
authored
Jan 15, 2002
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only test ntpath.abspath() on Windows. This allows the rest of the module to
be tested regardless of the host platform.
parent
3d62f8ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
Lib/test/test_ntpath.py
Lib/test/test_ntpath.py
+12
-2
No files found.
Lib/test/test_ntpath.py
View file @
5e99731a
...
...
@@ -41,8 +41,6 @@ tester('ntpath.isabs("\\\\conky\\mountpoint\\")', 1)
tester
(
'ntpath.isabs("
\
\
foo")'
,
1
)
tester
(
'ntpath.isabs("
\
\
foo
\
\
bar")'
,
1
)
tester
(
'ntpath.abspath("C:
\
\
")'
,
"C:
\
\
"
)
tester
(
'ntpath.commonprefix(["/home/swenson/spam", "/home/swen/spam"])'
,
"/home/swen"
)
tester
(
'ntpath.commonprefix(["
\
\
home
\
\
swen
\
\
spam", "
\
\
home
\
\
swen
\
\
eggs"])'
,
...
...
@@ -108,6 +106,18 @@ tester("ntpath.normpath('c:/../../..')", 'c:\\')
tester("ntpath.normpath('
..
/
..
/
.
/
..
')", r'
..
\
..
\
..
')
tester("ntpath.normpath('
K
:..
/
..
/
.
/
..
')", r'
K
:..
\
..
\
..
')
# ntpath.abspath() can only be used on a system with the "nt" module
# (reasonably), so we protect this test with "import nt". This allows
# the rest of the tests for the ntpath module to be run to completion
# on any platform, since most of the module is intended to be usable
# from any platform.
try:
import nt
except ImportError:
pass
else:
tester('
ntpath
.
abspath
(
"C:
\
\
"
)
', "C:
\
\
")
if errors:
raise TestFailed(str(errors) + " errors.")
elif verbose:
...
...
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