diff options
| author | Senthil Kumaran <orsenthil@gmail.com> | 2010-01-08 19:04:16 (GMT) |
|---|---|---|
| committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-01-08 19:04:16 (GMT) |
| commit | ce8e33a095030e7af94f58f9da196b240bdf0476 (patch) | |
| tree | b0ba50cbb6e85c6be6f6e6a870e4232be50a0f9c /Lib/test/regrtest.py | |
| parent | 3ddc435af6873c6304058d7bcbcb19ee4fba7781 (diff) | |
| download | cpython-ce8e33a095030e7af94f58f9da196b240bdf0476.zip cpython-ce8e33a095030e7af94f58f9da196b240bdf0476.tar.gz cpython-ce8e33a095030e7af94f58f9da196b240bdf0476.tar.bz2 | |
Reverting the Revision: 77368. I committed Flox's big patch for tests by
mistake. ( It may come in for sure tough)
Diffstat (limited to 'Lib/test/regrtest.py')
| -rwxr-xr-x | Lib/test/regrtest.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 56c53da..fd6cafc 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -150,6 +150,7 @@ option '-uall,-bsddb'. import cStringIO import getopt import itertools +import json import os import random import re @@ -159,13 +160,15 @@ import traceback import warnings import unittest -with warnings.catch_warnings(): - # Silence Py3k warnings - warnings.filterwarnings("ignore", "tuple parameter unpacking " - "has been removed", SyntaxWarning) - warnings.filterwarnings("ignore", "assignment to True or False " - "is forbidden", SyntaxWarning) - import json +# I see no other way to suppress these warnings; +# putting them in test_grammar.py has no effect: +warnings.filterwarnings("ignore", "hex/oct constants", FutureWarning, + ".*test.test_grammar$") +if sys.maxint > 0x7fffffff: + # Also suppress them in <string>, because for 64-bit platforms, + # that's where test_grammar.py hides them. + warnings.filterwarnings("ignore", "hex/oct constants", FutureWarning, + "<string>") # Ignore ImportWarnings that only occur in the source tree, # (because of modules with the same name as source-directories in Modules/) |
