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
08bd4aaa
Commit
08bd4aaa
authored
Apr 11, 2012
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use assertWarns instead of check_warnings - Issue14341
parent
9fe92d1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
Lib/test/test_urllib2.py
Lib/test/test_urllib2.py
+9
-7
No files found.
Lib/test/test_urllib2.py
View file @
08bd4aaa
...
...
@@ -618,21 +618,23 @@ class OpenerDirectorTests(unittest.TestCase):
def
test_method_deprecations
(
self
):
req
=
Request
(
"http://www.example.com"
)
with
support
.
check_warnings
((
''
,
DeprecationWarning
)):
with
self
.
assertWarns
(
DeprecationWarning
)
as
cm
:
req
.
add_data
(
"data"
)
with
s
upport
.
check_warnings
((
''
,
DeprecationWarning
))
:
with
s
elf
.
assertWarns
(
DeprecationWarning
)
as
cm
:
req
.
has_data
()
with
s
upport
.
check_warnings
((
''
,
DeprecationWarning
))
:
with
s
elf
.
assertWarns
(
DeprecationWarning
)
as
cm
:
req
.
get_data
()
with
s
upport
.
check_warnings
((
''
,
DeprecationWarning
))
:
with
s
elf
.
assertWarns
(
DeprecationWarning
)
as
cm
:
req
.
get_host
()
with
s
upport
.
check_warnings
((
''
,
DeprecationWarning
))
:
with
s
elf
.
assertWarns
(
DeprecationWarning
)
as
cm
:
req
.
get_selector
()
with
s
upport
.
check_warnings
((
''
,
DeprecationWarning
))
:
with
s
elf
.
assertWarns
(
DeprecationWarning
)
as
cm
:
req
.
is_unverifiable
()
with
s
upport
.
check_warnings
((
''
,
DeprecationWarning
))
:
with
s
elf
.
assertWarns
(
DeprecationWarning
)
as
cm
:
req
.
get_origin_req_host
()
def
sanepathname2url
(
path
):
try
:
path
.
encode
(
"utf-8"
)
...
...
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