diff options
author | Senthil Kumaran <skumaran@gatech.edu> | 2017-03-31 06:15:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-31 06:15:56 (GMT) |
commit | 6356a3b7109c5c546c1e7be098170be194142f39 (patch) | |
tree | e48fed97e8381cc9fb2fcf254f366a468c936d09 | |
parent | 9273dfe1800fc7241d69f4d523d748ebd35b3801 (diff) | |
download | cpython-6356a3b7109c5c546c1e7be098170be194142f39.zip cpython-6356a3b7109c5c546c1e7be098170be194142f39.tar.gz cpython-6356a3b7109c5c546c1e7be098170be194142f39.tar.bz2 |
Remove catching OSError in ftphandler test. Only URLError is raised in urllib.request module. (#918) (#921)
(cherry picked from commit ed3dd1c02af6872bd0748f7b9a5dadb89f7b830f)
-rw-r--r-- | Lib/test/test_urllib2.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py index 8c11b40..49e6c82 100644 --- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -826,7 +826,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), @@ -835,7 +834,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) @@ -1616,7 +1615,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): |