]> granicus.if.org Git - python/commitdiff
test_gopher(): Squash another deprecation
authorTim Peters <tim.peters@gmail.com>
Sun, 19 Feb 2006 05:09:00 +0000 (05:09 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 19 Feb 2006 05:09:00 +0000 (05:09 +0000)
warning about gopherlib.

Lib/test/test_urllib2.py

index 0b2a65061cd6434d627075f3a13c92c940839e99..5710444017590e196daa3d285f6d50338715c1cf 100644 (file)
@@ -704,6 +704,11 @@ class NetworkTests(unittest.TestCase):
         self._test_urls(urls, self._extra_handlers())
 
     def test_gopher(self):
+        import warnings
+        warnings.filterwarnings("ignore",
+                                "the gopherlib module is deprecated",
+                                DeprecationWarning,
+                                "urllib2$")
         urls = [
             # Thanks to Fred for finding these!
             'gopher://gopher.lib.ncsu.edu/11/library/stacks/Alex',