Suppress new deprecation warnings when running the
test suite.
For urllib2, move the import of gopherlib into the
only function that uses it: users (including the
test suite) certainly shouldn't see a deprecation
warning just because they import urllib2! If they
actually use gopher_open(), fine, _then_ they should
see a deprecation warning.
diff --git a/Lib/test/test_imageop.py b/Lib/test/test_imageop.py
index 7b32bbc..b01e83f 100755
--- a/Lib/test/test_imageop.py
+++ b/Lib/test/test_imageop.py
@@ -9,6 +9,12 @@
import imageop, uu, os
+import warnings
+warnings.filterwarnings("ignore",
+ "the rgbimg module is deprecated",
+ DeprecationWarning,
+ ".*test_imageop")
+
def main(use_rgbimg=1):
# Create binary test files