We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f98b64 commit 2752daaCopy full SHA for 2752daa
Lib/test/test_capi/test_type.py
@@ -15,7 +15,8 @@ class MyType:
15
MyType.attr = "mutable"
16
17
type_freeze(MyType)
18
- with self.assertRaises(TypeError):
+ err_msg = "cannot set 'attr' attribute of immutable type 'MyType'"
19
+ with self.assertRaisesRegex(TypeError, err_msg):
20
# the class is now immutable
21
MyType.attr = "immutable"
22
@@ -36,7 +37,6 @@ class D(A, C): pass
36
37
# as well
38
type_freeze(D)
39
-
40
def test_freeze_meta(self):
41
"""test PyType_Freeze() with overridden MRO"""
42
type_freeze = _testcapi.type_freeze
0 commit comments