Skip to content

Commit 843fae9

Browse files
committed
#17471 - Improve urllib2 test coverage. Patch contributed by Daniel Wozniak
1 parent f5d7cc2 commit 843fae9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/test_urllib2.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ def test_parse_http_list(self):
4747
for string, list in tests:
4848
self.assertEqual(urllib.request.parse_http_list(string), list)
4949

50+
def test_URLError_reasonstr(self):
51+
err = urllib.error.URLError('reason')
52+
self.assertIn(err.reason, str(err))
5053

5154
def test_request_headers_dict():
5255
"""

0 commit comments

Comments
 (0)