summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllibnet.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-08-02 23:34:49 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-08-02 23:34:49 (GMT)
commit1d55ec329a08c2d022d4d83887bd71755bc52026 (patch)
tree01731ecfcdb5a5be08ff566febb4de0cc047636a /Lib/test/test_urllibnet.py
parentcc436eb6e83f231c4d5c1bfdd8565b6b4b45effa (diff)
downloadcpython-1d55ec329a08c2d022d4d83887bd71755bc52026.zip
cpython-1d55ec329a08c2d022d4d83887bd71755bc52026.tar.gz
cpython-1d55ec329a08c2d022d4d83887bd71755bc52026.tar.bz2
Merged revisions 79539 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r79539 | florent.xicluna | 2010-04-01 01:01:03 +0300 (Thu, 01 Apr 2010) | 2 lines Replace catch_warnings with check_warnings when it makes sense. Use assertRaises context manager to simplify some tests. ........
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 dc46c21..d7ba5d9 100644
--- a/Lib/test/test_urllibnet.py
+++ b/Lib/test/test_urllibnet.py
@@ -193,10 +193,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)