mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix test_urllib2 error on Windows in relation with issue #13287.
This commit is contained in:
parent
245a94b6e8
commit
3dbb1f17cb
1 changed files with 4 additions and 0 deletions
|
@ -26,6 +26,10 @@ class TrivialTests(unittest.TestCase):
|
|||
context = {}
|
||||
exec('from urllib.%s import *' % module, context)
|
||||
del context['__builtins__']
|
||||
if module == 'request' and os.name == 'nt':
|
||||
u, p = context.pop('url2pathname'), context.pop('pathname2url')
|
||||
self.assertEqual(u.__module__, 'nturl2path')
|
||||
self.assertEqual(p.__module__, 'nturl2path')
|
||||
for k, v in context.items():
|
||||
self.assertEqual(v.__module__, 'urllib.%s' % module,
|
||||
"%r is exposed in 'urllib.%s' but defined in %r" %
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue