From 843fae93121ac7ac1088b0521773eff567e7b41c Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Tue, 19 Mar 2013 13:43:42 -0700 Subject: #17471 - Improve urllib2 test coverage. Patch contributed by Daniel Wozniak --- Lib/test/test_urllib2.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py index 5eab30a..a9776ac 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(): """ -- cgit v0.12