From: Senthil Kumaran Date: Tue, 19 Mar 2013 20:43:42 +0000 (-0700) Subject: #17471 - Improve urllib2 test coverage. Patch contributed by Daniel Wozniak X-Git-Tag: v3.2.4rc1~19^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=843fae93121ac7ac1088b0521773eff567e7b41c;p=python #17471 - Improve urllib2 test coverage. Patch contributed by Daniel Wozniak --- diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py index 5eab30af76..a9776ac857 100644 --- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -47,6 +47,9 @@ class TrivialTests(unittest.TestCase): for string, list in tests: self.assertEqual(urllib.request.parse_http_list(string), list) + def test_URLError_reasonstr(self): + err = urllib.error.URLError('reason') + self.assertIn(err.reason, str(err)) def test_request_headers_dict(): """