summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 b56877a..46f5da7 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -64,6 +64,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():
"""