mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Issue #7665: Fixed tests test_ntpath and test_urllib2 when ran in the
directory containing a backslash.
This commit is contained in:
commit
0e992b352a
2 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue