From cfb68218b701e1bf73bb82e51dfc8446ab65452a Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 31 Jul 2010 21:40:15 +0000 Subject: #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. --- Lib/test/test_ntpath.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Lib/test/test_ntpath.py') diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py index 0fd81b63ce..86e3eda46b 100644 --- a/Lib/test/test_ntpath.py +++ b/Lib/test/test_ntpath.py @@ -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() -- cgit v1.2.1