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.
This commit is contained in:
Tim Peters 2006-02-18 04:14:16 +00:00
parent 24f7cad6ca
commit e2c9a6cea7
4 changed files with 16 additions and 1 deletions

View file

@ -9,6 +9,10 @@ warnings.filterwarnings("ignore", ".* 'pre' .*", DeprecationWarning,
r'pre$')
warnings.filterwarnings("ignore", ".* regsub .*", DeprecationWarning,
r'^regsub$')
warnings.filterwarnings("ignore",
"the gopherlib module is deprecated",
DeprecationWarning,
"<string>")
class AllTest(unittest.TestCase):