summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2013-03-19 20:43:42 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2013-03-19 20:43:42 (GMT)
commit843fae93121ac7ac1088b0521773eff567e7b41c (patch)
treecae51ef1a6c6a557ce3b6b4ffe41c0cb0796d373
parentf5d7cc239e61e063e7bab783d55deb8e72210674 (diff)
downloadcpython-843fae93121ac7ac1088b0521773eff567e7b41c.zip
cpython-843fae93121ac7ac1088b0521773eff567e7b41c.tar.gz
cpython-843fae93121ac7ac1088b0521773eff567e7b41c.tar.bz2
#17471 - Improve urllib2 test coverage. Patch contributed by Daniel Wozniak
-rw-r--r--Lib/test/test_urllib2.py3
1 files changed, 3 insertions, 0 deletions
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():
"""