[Python-checkins] gh-95388: Suppress deprecation warning in test_immutable_type_with_mutable_base (GH-95728)

encukou webhook-mailer at python.org
Mon Aug 8 06:16:43 EDT 2022


https://github.com/python/cpython/commit/78a85a34ea2583b8489eeafba5b2018fa2048a4d
commit: 78a85a34ea2583b8489eeafba5b2018fa2048a4d
branch: main
author: Erlend E. Aasland <erlend.aasland at protonmail.com>
committer: encukou <encukou at gmail.com>
date: 2022-08-08T12:15:57+02:00
summary:

gh-95388: Suppress deprecation warning in test_immutable_type_with_mutable_base (GH-95728)

When 3.14 kicks in, it'll be a RuntimeError;
the test will correctly fail then.

files:
M Lib/test/test_capi.py

diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index c7435578974..1ff14e7bc56 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -645,6 +645,7 @@ def test_pytype_fromspec_with_repeated_slots(self):
                 with self.assertRaises(SystemError):
                     _testcapi.create_type_from_repeated_slots(variant)
 
+    @warnings_helper.ignore_warnings(category=DeprecationWarning)
     def test_immutable_type_with_mutable_base(self):
         # Add deprecation warning here so it's removed in 3.14
         warnings._deprecated(



More information about the Python-checkins mailing list