Skip to content

Commit cbc8466

Browse files
committed
Fix non-function annotate test for non-wrapped AttributeError
1 parent 1737973 commit cbc8466

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Lib/test/test_annotationlib.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,10 +1610,7 @@ def __call__(self, format, /, __Format=Format,
16101610
annotations = annotationlib.call_annotate_function(Annotate(), Format.STRING)
16111611
self.assertEqual(annotations, {"x": "float"})
16121612

1613-
with self.assertRaisesRegex(
1614-
AttributeError,
1615-
"annotate function requires __code__ attribute"
1616-
):
1613+
with self.assertRaises(AttributeError) as cm:
16171614
annotations = annotationlib.call_annotate_function(
16181615
Annotate(), Format.FORWARDREF
16191616
)

0 commit comments

Comments
 (0)