Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f47e77f3
Commit
f47e77f3
authored
Mar 19, 2013
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Plain Diff
#17471 - merge from 3.2
parents
5cfbde0e
2a4d2451
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
Lib/test/test_urllib2.py
Lib/test/test_urllib2.py
+7
-1
No files found.
Lib/test/test_urllib2.py
View file @
f47e77f3
...
...
@@ -1504,11 +1504,17 @@ class RequestTests(unittest.TestCase):
interface even though HTTPError is a subclass of URLError.
>>> msg = 'something bad happened'
>>> url = code = hdrs = fp = None
>>> url = code = fp = None
>>> hdrs = 'Content-Length: 42'
>>> err = urllib.error.HTTPError(url, code, msg, hdrs, fp)
>>> assert hasattr(err, 'reason')
>>> err.reason
'something bad happened'
>>> assert hasattr(err, 'hdrs')
>>> err.hdrs
'Content-Length: 42'
>>> expected_errmsg = 'HTTP Error %s: %s' % (err.code, err.msg)
>>> assert str(err) == expected_errmsg
"""
def
test_HTTPError_interface_call
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment