]> granicus.if.org Git - python/commitdiff
Pass positional arguments - HTTPError is not accepting keyword arguments. Reference...
authorJason R. Coombs <jaraco@jaraco.com>
Sun, 4 Dec 2011 04:18:11 +0000 (23:18 -0500)
committerJason R. Coombs <jaraco@jaraco.com>
Sun, 4 Dec 2011 04:18:11 +0000 (23:18 -0500)
Lib/test/test_urllib2.py

index cf6ccbc25c1320901851534b832accc6050fb632..307a86a14150207e9a397df1c86484da00f4af24 100644 (file)
@@ -1454,7 +1454,9 @@ def test_HTTPError_interface():
     Issue 13211 reveals that HTTPError didn't implement the URLError
     interface even though HTTPError is a subclass of URLError.
 
-    >>> err = urllib.error.HTTPError(msg='something bad happened', url=None, code=None, hdrs=None, fp=None)
+    >>> msg = 'something bad happened'
+    >>> url = code = hdrs = fp = None
+    >>> err = urllib.error.HTTPError(msg, url, code, hdrs, fp)
     >>> assert hasattr(err, 'reason')
     >>> err.reason
     'something bad happened'