Issue #7665: Fixed tests test_ntpath and test_urllib2 when ran in the

directory containing a backslash.
This commit is contained in:
Serhiy Storchaka 2015-01-26 10:26:14 +02:00
parent 624caf7bcb
commit 5106d044ec
2 changed files with 5 additions and 4 deletions

View file

@ -44,7 +44,7 @@ class TrivialTests(unittest.TestCase):
self.assertRaises(ValueError, urllib.request.urlopen, 'bogus url')
# XXX Name hacking to get this to work on Windows.
fname = os.path.abspath(urllib.request.__file__).replace('\\', '/')
fname = os.path.abspath(urllib.request.__file__).replace(os.sep, '/')
if os.name == 'nt':
file_url = "file:///%s" % fname