From: R David Murray Date: Wed, 11 Jun 2014 21:09:43 +0000 (-0400) Subject: Suppress a couple more DeprecationWarnings in the test suite. X-Git-Tag: v3.5.0a4~124^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=842f00e72509db50957ceb00d289b305dbc5a0a5;p=python Suppress a couple more DeprecationWarnings in the test suite. --- diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py index 4c8ba2d22c..42ebb6e60b 100644 --- a/Lib/test/test_urllibnet.py +++ b/Lib/test/test_urllibnet.py @@ -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: