From 3dbb1f17cbbc6f616a75e902c527a41bb7fc8bfe Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Fri, 4 Nov 2011 22:15:37 +0100 Subject: [PATCH] Fix test_urllib2 error on Windows in relation with issue #13287. --- Lib/test/test_urllib2.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py index e55140e1d83..aa1854d5ce3 100644 --- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -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" %