]> granicus.if.org Git - python/commitdiff
Suppressing all DeprecationWarning messages was a bit of a problem for
authorGuido van Rossum <guido@python.org>
Tue, 4 Sep 2001 15:22:02 +0000 (15:22 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 4 Sep 2001 15:22:02 +0000 (15:22 +0000)
the -Qwarnall option, so I've changed this to only filter out the one
warning that's a problem in practice.

Lib/test/test___all__.py

index 3ed22f9a10ee8565e72e8ab504bea4c2cbdcf611..8a4734c1db6e52c63a43cc548aa5bfb8e802fa2b 100644 (file)
@@ -2,9 +2,6 @@ from test_support import verify, verbose
 import sys
 
 def check_all(modname):
-    import warnings
-    warnings.filterwarnings("ignore", "", DeprecationWarning, modname)
-
     names = {}
     try:
         exec "import %s" % modname in names
@@ -122,6 +119,9 @@ check_all("quopri")
 check_all("random")
 check_all("re")
 check_all("reconvert")
+import warnings
+warnings.filterwarnings("ignore", ".* regsub .*", DeprecationWarning, "regsub",
+                        append=1)
 check_all("regsub")
 check_all("repr")
 check_all("rexec")