summaryrefslogtreecommitdiff
path: root/Lib/test/test_urllibnet.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_urllibnet.py')
-rw-r--r--Lib/test/test_urllibnet.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py
index 77b544552d..8eb01e577e 100644
--- a/Lib/test/test_urllibnet.py
+++ b/Lib/test/test_urllibnet.py
@@ -182,10 +182,8 @@ class urlretrieveNetworkTests(unittest.TestCase):
def test_main():
test_support.requires('network')
- from warnings import filterwarnings, catch_warnings
- with catch_warnings():
- filterwarnings('ignore', '.*urllib\.urlopen.*Python 3.0',
- DeprecationWarning)
+ with test_support.check_py3k_warnings(
+ ("urllib.urlopen.. has been removed", DeprecationWarning)):
test_support.run_unittest(URLTimeoutTest,
urlopenNetworkTests,
urlretrieveNetworkTests)