diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-10-21 20:30:02 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-10-21 20:30:02 (GMT) |
commit | f577686fd3c4a78bb1fe881a872731600ec7c3b6 (patch) | |
tree | bd6b05ccca5a3f6dbd8843f024d09c7141292b0c /Lib/test/test_urllib.py | |
parent | 8a915499f65cb9477483e4af23f93825edaa1d25 (diff) | |
download | cpython-f577686fd3c4a78bb1fe881a872731600ec7c3b6.zip cpython-f577686fd3c4a78bb1fe881a872731600ec7c3b6.tar.gz cpython-f577686fd3c4a78bb1fe881a872731600ec7c3b6.tar.bz2 |
Issue #10836: Fix exception raised when file not found in urlretrieve
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r-- | Lib/test/test_urllib.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index 22ada56..5721296 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -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: |