summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_httplib.py
diff options
context:
space:
mode:
authorDirkjan Ochtman <dirkjan@ochtman.nl>2010-02-24 04:49:00 (GMT)
committerDirkjan Ochtman <dirkjan@ochtman.nl>2010-02-24 04:49:00 (GMT)
commitebc73dce57b1c616b966ba05fe68db5a1c646d52 (patch)
tree1888a2d0b8aa4074860b4afcdb0962990a730674 /Lib/test/test_httplib.py
parente4c74e1ea26e77b065a8999b7192160595474211 (diff)
downloadcpython-ebc73dce57b1c616b966ba05fe68db5a1c646d52.zip
cpython-ebc73dce57b1c616b966ba05fe68db5a1c646d52.tar.gz
cpython-ebc73dce57b1c616b966ba05fe68db5a1c646d52.tar.bz2
Issue #7427: improve the representation of httplib.BadStatusLine exceptions.
Diffstat (limited to 'Lib/test/test_httplib.py')
-rw-r--r--Lib/test/test_httplib.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py
index c0c12e7..107b904 100644
--- a/Lib/test/test_httplib.py
+++ b/Lib/test/test_httplib.py
@@ -91,6 +91,10 @@ class BasicTest(TestCase):
resp = httplib.HTTPResponse(sock)
self.assertRaises(httplib.BadStatusLine, resp.begin)
+ def test_bad_status_repr(self):
+ exc = httplib.BadStatusLine('')
+ self.assertEquals(repr(exc), '''BadStatusLine("\'\'",)''')
+
def test_partial_reads(self):
# if we have a lenght, the system knows when to close itself
# same behaviour than when we read the whole thing with read()