mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Suppress a couple more DeprecationWarnings in the test suite.
This commit is contained in:
parent
93da9b5e57
commit
842f00e725
1 changed files with 2 additions and 1 deletions
|
@ -91,7 +91,8 @@ class urlopenNetworkTests(unittest.TestCase):
|
|||
# test getcode() with the fancy opener to get 404 error codes
|
||||
URL = "http://www.example.com/XXXinvalidXXX"
|
||||
with support.transient_internet(URL):
|
||||
open_url = urllib.request.FancyURLopener().open(URL)
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
open_url = urllib.request.FancyURLopener().open(URL)
|
||||
try:
|
||||
code = open_url.getcode()
|
||||
finally:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue