Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3dbb1f1

Browse files
committed
Fix test_urllib2 error on Windows in relation with issue #13287.
1 parent 245a94b commit 3dbb1f1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/test/test_urllib2.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ def test___all__(self):
2626
context = {}
2727
exec('from urllib.%s import *' % module, context)
2828
del context['__builtins__']
29+
if module == 'request' and os.name == 'nt':
30+
u, p = context.pop('url2pathname'), context.pop('pathname2url')
31+
self.assertEqual(u.__module__, 'nturl2path')
32+
self.assertEqual(p.__module__, 'nturl2path')
2933
for k, v in context.items():
3034
self.assertEqual(v.__module__, 'urllib.%s' % module,
3135
"%r is exposed in 'urllib.%s' but defined in %r" %

0 commit comments

Comments
 (0)