diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-31 11:46:54 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-31 11:46:54 (GMT) |
commit | ef4909643d6e1d07626c646137699dfc6b6346f8 (patch) | |
tree | 191a314cb4ce6a4480bdce1e48ef7ee2b1f2eda1 /Lib/test/test_coercion.py | |
parent | 46bff79d1ffa0308bf902fc8961365d7d2fb2c1a (diff) | |
download | cpython-ef4909643d6e1d07626c646137699dfc6b6346f8.zip cpython-ef4909643d6e1d07626c646137699dfc6b6346f8.tar.gz cpython-ef4909643d6e1d07626c646137699dfc6b6346f8.tar.bz2 |
#7092: silence more -3 and -Wd warnings
Diffstat (limited to 'Lib/test/test_coercion.py')
-rw-r--r-- | Lib/test/test_coercion.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Lib/test/test_coercion.py b/Lib/test/test_coercion.py index 67d19a6..34eb19e 100644 --- a/Lib/test/test_coercion.py +++ b/Lib/test/test_coercion.py @@ -223,8 +223,10 @@ def process_infix_results(): infix_results[key] = res - -process_infix_results() +with warnings.catch_warnings(): + warnings.filterwarnings("ignore", "classic int division", + DeprecationWarning) + process_infix_results() # now infix_results has two lists of results for every pairing. prefix_binops = [ 'divmod' ] @@ -337,11 +339,12 @@ class CoercionTest(unittest.TestCase): raise exc def test_main(): - warnings.filterwarnings("ignore", - r'complex divmod\(\), // and % are deprecated', - DeprecationWarning, - r'test.test_coercion$') - run_unittest(CoercionTest) + with warnings.catch_warnings(): + warnings.filterwarnings("ignore", "complex divmod.., // and % " + "are deprecated", DeprecationWarning) + warnings.filterwarnings("ignore", "classic (int|long) division", + DeprecationWarning) + run_unittest(CoercionTest) if __name__ == "__main__": test_main() |