diff Lib/test/test_array.py @ 71226:7bfedb159e82 2.7

test_array: make quiet the DeprecationWarning
author Victor Stinner <victor.stinner@haypocalc.com>
date Tue, 05 Jul 2011 13:14:17 +0200
parents b36cb4602e21
children 91382d4e2dfb
line wrap: on
line diff
--- a/Lib/test/test_array.py	Tue Jul 05 11:28:19 2011 +0200
+++ b/Lib/test/test_array.py	Tue Jul 05 13:14:17 2011 +0200
@@ -4,6 +4,7 @@
 """
 
 import unittest
+import warnings
 from test import test_support
 from weakref import proxy
 import array, cStringIO
@@ -783,7 +784,9 @@
 
     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):