]> granicus.if.org Git - python/commitdiff
test_array: make quiet the DeprecationWarning
authorVictor Stinner <victor.stinner@haypocalc.com>
Tue, 5 Jul 2011 11:14:17 +0000 (13:14 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Tue, 5 Jul 2011 11:14:17 +0000 (13:14 +0200)
Lib/test/test_array.py

index b6c0f1bdd589517130a876c95dc375ad52be8131..acf5b8f81a5f78f29826417172bb29195d42f6b1 100755 (executable)
@@ -4,6 +4,7 @@
 """
 
 import unittest
+import warnings
 from test import test_support
 from weakref import proxy
 import array, cStringIO
@@ -783,7 +784,9 @@ class BaseTest(unittest.TestCase):
 
     def test_subclass_with_kwargs(self):
         # SF bug #1486663 -- this used to erroneously raise a TypeError
-        ArraySubclassWithKwargs('b', newarg=1)
+        with warnings.catch_warnings():
+            warnings.filterwarnings("ignore", '', DeprecationWarning)
+            ArraySubclassWithKwargs('b', newarg=1)
 
 
 class StringTest(BaseTest):