From: Inada Naoki Date: Tue, 4 Jul 2023 17:02:49 +0000 (+0900) Subject: gh-106162: array: suppress warning in test_array (#106404) X-Git-Tag: v3.13.0a1~1520 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a4bba8b9764ba28667b137fe62c11aea672f500;p=thirdparty%2FPython%2Fcpython.git gh-106162: array: suppress warning in test_array (#106404) array: suppress warning in test_array --- diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index bec3766b87b2..a219fa365e7f 100755 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -215,6 +215,14 @@ class BaseTest: # outside: An entry that is not in example # minitemsize: the minimum guaranteed itemsize + def setUp(self): + self.enterContext(warnings.catch_warnings()) + warnings.filterwarnings( + "ignore", + message="The 'u' type code is deprecated and " + "will be removed in Python 3.16", + category=DeprecationWarning) + def assertEntryEqual(self, entry1, entry2): self.assertEqual(entry1, entry2)