summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib.py
diff options
context:
space:
mode:
authorBarney Gale <barney.gale@gmail.com>2024-11-22 04:12:50 (GMT)
committerGitHub <noreply@github.com>2024-11-22 04:12:50 (GMT)
commit8c98ed846a7d7e50c4cf06f823d94737144dcf6a (patch)
treeba5e770bbeffb7b320c15219972917a01a58af26 /Lib/test/test_urllib.py
parentebf564a1d3e2e81b9846535114e481d6096443d2 (diff)
downloadcpython-8c98ed846a7d7e50c4cf06f823d94737144dcf6a.zip
cpython-8c98ed846a7d7e50c4cf06f823d94737144dcf6a.tar.gz
cpython-8c98ed846a7d7e50c4cf06f823d94737144dcf6a.tar.bz2
GH-127078: `url2pathname()`: handle extra slash before UNC drive in URL path (#127132)
Decode a file URI like `file://///server/share` as a UNC path like `\\server\share`. This form of file URI is created by software the simply prepends `file:///` to any absolute Windows path.
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r--Lib/test/test_urllib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index e1c1d31..a204ef4 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -1492,7 +1492,7 @@ class Pathname_Tests(unittest.TestCase):
# UNC paths
self.assertEqual(fn('//server/path/to/file'), '\\\\server\\path\\to\\file')
self.assertEqual(fn('////server/path/to/file'), '\\\\server\\path\\to\\file')
- self.assertEqual(fn('/////server/path/to/file'), '\\\\\\server\\path\\to\\file')
+ self.assertEqual(fn('/////server/path/to/file'), '\\\\server\\path\\to\\file')
# Localhost paths
self.assertEqual(fn('//localhost/C:/path/to/file'), 'C:\\path\\to\\file')
self.assertEqual(fn('//localhost/C|/path/to/file'), 'C:\\path\\to\\file')