diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 21:10:48 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 21:10:48 (GMT) |
commit | 0832af6628ca5ac02d0226899725297dd508470b (patch) | |
tree | fc4e7d05d9c6f51eb97f3e8abbcab2b226330b94 /Lib/test/test_httplib.py | |
parent | ad28c7f9dad791567afa0624acfb3ba430851965 (diff) | |
download | cpython-0832af6628ca5ac02d0226899725297dd508470b.zip cpython-0832af6628ca5ac02d0226899725297dd508470b.tar.gz cpython-0832af6628ca5ac02d0226899725297dd508470b.tar.bz2 |
Issue #16717: get rid of socket.error, replace with OSError
Diffstat (limited to 'Lib/test/test_httplib.py')
-rw-r--r-- | Lib/test/test_httplib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index 5ebcfcb..9c53e9c 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -45,7 +45,7 @@ class EPipeSocket(FakeSocket): def sendall(self, data): if self.pipe_trigger in data: - raise socket.error(errno.EPIPE, "gotcha") + raise OSError(errno.EPIPE, "gotcha") self.data += data def close(self): @@ -515,7 +515,7 @@ class BasicTest(TestCase): b"Content-Length") conn = client.HTTPConnection("example.com") conn.sock = sock - self.assertRaises(socket.error, + self.assertRaises(OSError, lambda: conn.request("PUT", "/url", "body")) resp = conn.getresponse() self.assertEqual(401, resp.status) |