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
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue