diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-08-02 03:14:27 (GMT) |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-08-02 03:14:27 (GMT) |
| commit | 38a5800cdca6ca11cd60ad07c520a512e88304de (patch) | |
| tree | f163f433c128a5691d37cff8549518ef5b085959 /Lib/test/test_coercion.py | |
| parent | 9c4fbdbc55f25a24a0ea137fecee5d880510fa9e (diff) | |
| download | cpython-38a5800cdca6ca11cd60ad07c520a512e88304de.zip cpython-38a5800cdca6ca11cd60ad07c520a512e88304de.tar.gz cpython-38a5800cdca6ca11cd60ad07c520a512e88304de.tar.bz2 | |
Merged revisions 77871,77910,77913 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77871 | ezio.melotti | 2010-01-31 13:46:54 +0200 (Sun, 31 Jan 2010) | 1 line
#7092: silence more -3 and -Wd warnings
........
r77910 | ezio.melotti | 2010-02-02 10:37:35 +0200 (Tue, 02 Feb 2010) | 1 line
#7092: silence py3k warnings for bsddb. Patch by Florent Xicluna.
........
r77913 | ezio.melotti | 2010-02-02 19:34:37 +0200 (Tue, 02 Feb 2010) | 1 line
#7092: Silence py3k warnings in test_exceptions and test_pep352. Patch by Florent Xicluna.
........
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 a70f82d..a36c041 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() |
