Skip to content

Commit ea60223

Browse files
committed
Update and simplify classmethod/staticmethod annotate function tests
1 parent a3b68ee commit ea60223

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_annotationlib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,15 +1618,15 @@ def test_callable_classmethod_annotate_forwardref_value_fallback(self):
16181618
# supported fall back to Format.VALUE and convert to strings
16191619
class Annotate:
16201620
@classmethod
1621-
def __call__(cls, format, /, __Format=Format,
1621+
def format(cls, format, /, __Format=Format,
16221622
__NotImplementedError=NotImplementedError):
16231623
if format == __Format.VALUE:
16241624
return {"x": str}
16251625
else:
16261626
raise __NotImplementedError(format)
16271627

16281628
annotations = annotationlib.call_annotate_function(
1629-
Annotate.__call__,
1629+
Annotate.format,
16301630
Format.FORWARDREF,
16311631
)
16321632

@@ -1637,15 +1637,15 @@ def test_callable_staticmethod_annotate_forwardref_value_fallback(self):
16371637
# supported fall back to Format.VALUE and convert to strings
16381638
class Annotate:
16391639
@staticmethod
1640-
def __call__(format, /, __Format=Format,
1640+
def format(format, /, __Format=Format,
16411641
__NotImplementedError=NotImplementedError):
16421642
if format == __Format.VALUE:
16431643
return {"x": str}
16441644
else:
16451645
raise __NotImplementedError(format)
16461646

16471647
annotations = annotationlib.call_annotate_function(
1648-
Annotate.__call__,
1648+
Annotate.format,
16491649
Format.FORWARDREF,
16501650
)
16511651

0 commit comments

Comments
 (0)