Remove catching OSError in filehandler test. Catch Only URLError by orsenthil · Pull Request #920 · python/cpython

Expand Up @@ -830,7 +830,6 @@ def test_file(self): 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), Expand All @@ -839,7 +838,7 @@ def test_file(self): 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) Expand Down Expand Up @@ -1689,7 +1688,6 @@ def test_invalid_closed(self): self.assertTrue(conn.fakesock.closed, "Connection not closed")


class MiscTests(unittest.TestCase):
def opener_has_handler(self, opener, handler_class): Expand Down