]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport some warnings filters to shut up complaints about complex
authorAnthony Baxter <anthonybaxter@gmail.com>
Tue, 23 Apr 2002 04:02:55 +0000 (04:02 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Tue, 23 Apr 2002 04:02:55 +0000 (04:02 +0000)
divmod &c. Should probably be cleaned up properly so that the tests
don't call that.

Lib/test/test_coercion.py
Lib/test/test_descr.py

index d39e6fd046e1a675cbb232c235898cdaddadd4b2..afade35287e562d1ff8ae52f4387ef6fb398d7a5 100644 (file)
@@ -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()
index ded362ee201c56ac62092603ed376dd0d1fb59b3..d89c3c24c091a8280cbd79735078092bfa8f2b4d 100644 (file)
@@ -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'(<string>|test_descr)$')
 
 def veris(a, b):
     if a is not b: