Skip to content

Commit 653b9ae

Browse files
committed
Windows test fixes python#2
1 parent 8086522 commit 653b9ae

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

Lib/test/test_urllib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ def test_pathname2url_win(self):
15321532
self.assertEqual(fn('C:\\a\\b\xe9'), '///C:/a/b%C3%A9')
15331533
self.assertEqual(fn('C:\\foo\\bar\\spam.foo'), "///C:/foo/bar/spam.foo")
15341534
# Long drive letter
1535-
self.assertEqual(fn("XX:\\"), "file:XX:/")
1535+
self.assertEqual(fn("XX:\\"), "XX%3A/")
15361536
# No drive letter
15371537
self.assertEqual(fn("\\folder\\test\\"), '/folder/test/')
15381538
self.assertEqual(fn("\\\\folder\\test\\"), '//folder/test/')
@@ -1566,7 +1566,7 @@ def test_url2pathname_win(self):
15661566
self.assertEqual(fn('/C|//'), 'C:\\\\')
15671567
self.assertEqual(fn('///C|/path'), 'C:\\path')
15681568
# No DOS drive
1569-
self.assertEqual(fn("///C/test/"), '\\\\\\C\\test\\')
1569+
self.assertEqual(fn("///C/test/"), '\\C\\test\\')
15701570
self.assertEqual(fn("////C/test/"), '\\\\C\\test\\')
15711571
# DOS drive paths
15721572
self.assertEqual(fn('C:/path/to/file'), 'C:\\path\\to\\file')

Lib/test/test_urllib2.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ def test___all__(self):
4343
context = {}
4444
exec('from urllib.%s import *' % module, context)
4545
del context['__builtins__']
46-
if module == 'request' and os.name == 'nt':
47-
u, p = context.pop('url2pathname'), context.pop('pathname2url')
48-
self.assertEqual(u.__module__, 'nturl2path')
49-
self.assertEqual(p.__module__, 'nturl2path')
5046
for k, v in context.items():
5147
self.assertEqual(v.__module__, 'urllib.%s' % module,
5248
"%r is exposed in 'urllib.%s' but defined in %r" %

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy