[Python-checkins] cpython (3.2): #17471 - Improve urllib2 test coverage. Patch contributed by Daniel Wozniak

senthil.kumaran python-checkins at python.org
Tue Mar 19 21:41:34 CET 2013


http://hg.python.org/cpython/rev/33f02ccb5301
changeset:   82773:33f02ccb5301
branch:      3.2
parent:      82769:8a08607abf32
user:        Senthil Kumaran <senthil at uthcode.com>
date:        Tue Mar 19 13:43:42 2013 -0700
summary:
  #17471 - Improve urllib2 test coverage. Patch contributed by Daniel Wozniak

files:
  Lib/test/test_urllib2.py |  3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -47,6 +47,9 @@
         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():
     """

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list