mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
#7909: the prefixes \\.\ and \\?\ indicate special Windows paths, do not try to manipulate them. See http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx for details.
This commit is contained in:
parent
a8867b4173
commit
cfb68218b7
3 changed files with 19 additions and 0 deletions
|
@ -174,6 +174,9 @@ class TestNtpath(unittest.TestCase):
|
|||
tester("ntpath.normpath('C:////a/b')", r'C:\a\b')
|
||||
tester("ntpath.normpath('//machine/share//a/b')", r'\\machine\share\a\b')
|
||||
|
||||
tester("ntpath.normpath('\\\\.\\NUL')", r'\\.\NUL')
|
||||
tester("ntpath.normpath('\\\\?\\D:/XY\\Z')", r'\\?\D:/XY\Z')
|
||||
|
||||
def test_expandvars(self):
|
||||
with support.EnvironmentVarGuard() as env:
|
||||
env.clear()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue