diff options
| author | Brett Cannon <bcannon@gmail.com> | 2008-07-02 01:57:08 (GMT) |
|---|---|---|
| committer | Brett Cannon <bcannon@gmail.com> | 2008-07-02 01:57:08 (GMT) |
| commit | 8bb8fa5dd679d1f4086fac4d3181f0985c14006d (patch) | |
| tree | d42673a3deb34bb5c03202b979b766eb89bb20a2 /Lib/test/test_urllibnet.py | |
| parent | aac51b8a69d65533f511f0483c797fcf6a6c696c (diff) | |
| download | cpython-8bb8fa5dd679d1f4086fac4d3181f0985c14006d.zip cpython-8bb8fa5dd679d1f4086fac4d3181f0985c14006d.tar.gz cpython-8bb8fa5dd679d1f4086fac4d3181f0985c14006d.tar.bz2 | |
Handle urllib's renaming for Python 3.0:
* Deprecate urllib.urlopen() in favor of urllib2.urlopen() for 3.0.
* Update docs to mention split/rename of the module and deprecation of
urlopen().
Changes to lib2to3 are in a separate commit. Work is for issue #2885.
Diffstat (limited to 'Lib/test/test_urllibnet.py')
| -rw-r--r-- | Lib/test/test_urllibnet.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py index 5e225ee..0404b77 100644 --- a/Lib/test/test_urllibnet.py +++ b/Lib/test/test_urllibnet.py @@ -182,9 +182,13 @@ class urlretrieveNetworkTests(unittest.TestCase): def test_main(): test_support.requires('network') - test_support.run_unittest(URLTimeoutTest, - urlopenNetworkTests, - urlretrieveNetworkTests) + from warnings import filterwarnings + with test_support.catch_warning(record=False): + filterwarnings('ignore', '.*urllib\.urlopen.*Python 3.0', + DeprecationWarning) + test_support.run_unittest(URLTimeoutTest, + urlopenNetworkTests, + urlretrieveNetworkTests) if __name__ == "__main__": test_main() |
