diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-01-08 18:41:40 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-01-08 18:41:40 (GMT) |
commit | 3ddc435af6873c6304058d7bcbcb19ee4fba7781 (patch) | |
tree | c7a03cf0a8b856bae2ebebba55b09f775845c7ca /Lib/test/regrtest.py | |
parent | 3194d1454cbc11ec477d83fff3fc749972107d29 (diff) | |
download | cpython-3ddc435af6873c6304058d7bcbcb19ee4fba7781.zip cpython-3ddc435af6873c6304058d7bcbcb19ee4fba7781.tar.gz cpython-3ddc435af6873c6304058d7bcbcb19ee4fba7781.tar.bz2 |
Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. Patch by flox
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-x | Lib/test/regrtest.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index fd6cafc..56c53da 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -150,7 +150,6 @@ option '-uall,-bsddb'. import cStringIO import getopt import itertools -import json import os import random import re @@ -160,15 +159,13 @@ import traceback import warnings import unittest -# 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>") +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 # Ignore ImportWarnings that only occur in the source tree, # (because of modules with the same name as source-directories in Modules/) |