From: Anthony Baxter Date: Tue, 23 Apr 2002 04:02:55 +0000 (+0000) Subject: backport some warnings filters to shut up complaints about complex X-Git-Tag: v2.2.2b1~407 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4b0c27ee986f038db15b83edffe8df2de3ff09a0;p=thirdparty%2FPython%2Fcpython.git backport some warnings filters to shut up complaints about complex divmod &c. Should probably be cleaned up properly so that the tests don't call that. --- diff --git a/Lib/test/test_coercion.py b/Lib/test/test_coercion.py index d39e6fd046e1..afade35287e5 100644 --- a/Lib/test/test_coercion.py +++ b/Lib/test/test_coercion.py @@ -1,5 +1,6 @@ import copy import sys +import warnings # Fake a number that implements numeric methods through __coerce__ class CoerceNumber: @@ -109,5 +110,9 @@ def do_prefix_binops(): else: print '=', x +warnings.filterwarnings("ignore", + r'complex divmod\(\), // and % are deprecated', + DeprecationWarning, + r'test_coercion$') do_infix_binops() do_prefix_binops() diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index ded362ee201c..d89c3c24c091 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -2,6 +2,11 @@ from test_support import verify, vereq, verbose, TestFailed, TESTFN from copy import deepcopy +import warnings + +warnings.filterwarnings("ignore", + r'complex divmod\(\), // and % are deprecated$', + DeprecationWarning, r'(|test_descr)$') def veris(a, b): if a is not b: