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:
Tim Peters 2002-04-16 00:01:09 +00:00
parent a91a02a76d
commit 7d79948103
4 changed files with 4 additions and 9 deletions

View file

@ -113,8 +113,5 @@ def do_prefix_binops():
warnings.filterwarnings("ignore",
r'complex divmod\(\), // and % are deprecated',
DeprecationWarning)
try:
do_infix_binops()
do_prefix_binops()
finally:
warnings.resetwarnings()
do_infix_binops()
do_prefix_binops()