]> granicus.if.org Git - python/commitdiff
Suppress warnings about test_grammar.py that can't be suppressed inside
authorGuido van Rossum <guido@python.org>
Mon, 12 Aug 2002 21:55:51 +0000 (21:55 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 12 Aug 2002 21:55:51 +0000 (21:55 +0000)
that file itself (because it's the parser that reports them).

Lib/test/regrtest.py

index 1fa5d506d46a269614b5a5280227bd65305a09dd..dee2847a45d0a01c58ac57db453724a9598a48f7 100755 (executable)
@@ -63,6 +63,12 @@ import getopt
 import traceback
 import random
 import StringIO
+import warnings
+
+# I see no other way to suppress these warnings;
+# putting them in test_grammar.py has no effect:
+warnings.filterwarnings("ignore", "hex/oct constants", DeprecationWarning,
+                        ".*test.test_grammar$")
 
 from test import test_support