From 4b0c27ee986f038db15b83edffe8df2de3ff09a0 Mon Sep 17 00:00:00 2001 From: Anthony Baxter Date: Tue, 23 Apr 2002 04:02:55 +0000 Subject: [PATCH] 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. --- Lib/test/test_coercion.py | 5 +++++ Lib/test/test_descr.py | 5 +++++ 2 files changed, 10 insertions(+) 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: -- 2.47.3