summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSenthil Kumaran <skumaran@gatech.edu>2017-03-31 05:43:05 (GMT)
committerGitHub <noreply@github.com>2017-03-31 05:43:05 (GMT)
commited3dd1c02af6872bd0748f7b9a5dadb89f7b830f (patch)
tree8675d3edc2712fca2bf1707454be1ad4750c2a60 /Lib
parent33db068dac7686e37736f7ecf8abb2aee0345cf2 (diff)
downloadcpython-ed3dd1c02af6872bd0748f7b9a5dadb89f7b830f.zip
cpython-ed3dd1c02af6872bd0748f7b9a5dadb89f7b830f.tar.gz
cpython-ed3dd1c02af6872bd0748f7b9a5dadb89f7b830f.tar.bz2
Remove catching OSError in ftphandler test. Only URLError is raised in urllib.request module. (#918)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_urllib2.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index 308acb3..b537fca 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -830,7 +830,6 @@ class HandlerTests(unittest.TestCase):
for url, ftp in [
("file://ftp.example.com//foo.txt", False),
("file://ftp.example.com///foo.txt", False),
-# XXXX bug: fails with OSError, should be URLError
("file://ftp.example.com/foo.txt", False),
("file://somehost//foo/something.txt", False),
("file://localhost//foo/something.txt", False),
@@ -839,7 +838,7 @@ class HandlerTests(unittest.TestCase):
try:
h.file_open(req)
# XXXX remove OSError when bug fixed
- except (urllib.error.URLError, OSError):
+ except urllib.error.URLError:
self.assertFalse(ftp)
else:
self.assertIs(o.req, req)
@@ -1689,7 +1688,6 @@ class HandlerTests(unittest.TestCase):
self.assertTrue(conn.fakesock.closed, "Connection not closed")
-
class MiscTests(unittest.TestCase):
def opener_has_handler(self, opener, handler_class):