Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Lib/test/test_urllib.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@ def test_iter(self):
def test_relativelocalfile(self):
self.assertRaises(ValueError,urllib.request.urlopen,'./' + self.pathname)

def test_remote_authority(self):
# Test for GH-90812.
url = 'file://pythontest.net/foo/bar'
with self.assertRaises(urllib.error.URLError) as e:
urllib.request.urlopen(url)
if os.name == 'nt':
self.assertEqual(e.exception.filename, r'\\pythontest.net\foo\bar')
else:
self.assertEqual(e.exception.reason, 'file:// scheme is supported only on localhost')


class ProxyTests(unittest.TestCase):

Expand Down
Loading