]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-106162: array: suppress warning in test_array (#106404)
authorInada Naoki <songofacandy@gmail.com>
Tue, 4 Jul 2023 17:02:49 +0000 (02:02 +0900)
committerGitHub <noreply@github.com>
Tue, 4 Jul 2023 17:02:49 +0000 (02:02 +0900)
array: suppress warning in test_array

Lib/test/test_array.py

index bec3766b87b2029073c3f2a8ee113fb14b7b49a4..a219fa365e7f20212c5253c2096d92cf19394cb8 100755 (executable)
@@ -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)