From 863cb9f28466c6f6c76d87746d553134c1bb58f3 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Tue, 4 Jul 2023 19:01:25 +0900 Subject: [PATCH] array: suppress warning in test_array --- Lib/test/test_array.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index bec3766b87b202..a219fa365e7f20 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)