Skip to content

Commit 33c5359

Browse files
committed
gh-153354: Fix annotation test format argument
1 parent ad3708a commit 33c5359

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/test/test_annotationlib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,7 @@ def annotate(format, /):
17141714
annotationlib.call_annotate_function(annotate, format=fmt)
17151715

17161716
def test_generated_annotate_non_bool_compare_result(self):
1717-
class NonBool:
1717+
class NonBool(int):
17181718
def __gt__(self, other):
17191719
return None
17201720

@@ -1723,7 +1723,7 @@ def func(x: int):
17231723
pass
17241724

17251725
self.assertEqual(
1726-
func.__annotate__(NonBool()),
1726+
func.__annotate__(NonBool(1)),
17271727
{"x": int},
17281728
)
17291729

@@ -1732,7 +1732,7 @@ class C:
17321732
y: int
17331733

17341734
self.assertEqual(
1735-
C.__annotate__(NonBool()),
1735+
C.__annotate__(NonBool(1)),
17361736
{"y": int},
17371737
)
17381738

@@ -1741,7 +1741,7 @@ class C:
17411741
exec("z: int", ns)
17421742

17431743
self.assertEqual(
1744-
ns["__annotate__"](NonBool()),
1744+
ns["__annotate__"](NonBool(1)),
17451745
{"z": int},
17461746
)
17471747

0 commit comments

Comments
 (0)