mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
It makes more sense to call resetwarnings() after every test runs than
to keep doing that in every test that wants to filter a warning.
This commit is contained in:
parent
a91a02a76d
commit
7d79948103
4 changed files with 4 additions and 9 deletions
|
@ -55,6 +55,7 @@ import getopt
|
|||
import traceback
|
||||
import random
|
||||
import StringIO
|
||||
import warnings
|
||||
|
||||
import test_support
|
||||
|
||||
|
@ -322,6 +323,7 @@ def runtest(test, generate, verbose, quiet, testdir = None):
|
|||
indirect_test()
|
||||
finally:
|
||||
sys.stdout = save_stdout
|
||||
warnings.resetwarnings()
|
||||
except (ImportError, test_support.TestSkipped), msg:
|
||||
if not quiet:
|
||||
print "test", test, "skipped --", msg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue