mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #10836: Fix exception raised when file not found in urlretrieve
This commit is contained in:
parent
8a915499f6
commit
f577686fd3
3 changed files with 10 additions and 2 deletions
|
@ -268,6 +268,11 @@ Content-Type: text/html; charset=iso-8859-1
|
|||
finally:
|
||||
self.unfakehttp()
|
||||
|
||||
def test_missing_localfile(self):
|
||||
# Test for #10836
|
||||
with self.assertRaises(urllib.error.URLError):
|
||||
urlopen('file://localhost/a/file/which/doesnot/exists.py')
|
||||
|
||||
def test_userpass_inurl(self):
|
||||
self.fakehttp(b"HTTP/1.0 200 OK\r\n\r\nHello!")
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue