Skip to content

Commit f6c102f

Browse files
committed
Fix test
1 parent 3115fd7 commit f6c102f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_functools.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3522,15 +3522,16 @@ def test_method_self_annotation(self):
35223522
"""See GH-130827."""
35233523
class A:
35243524
@functools.singledispatchmethod
3525-
def u(self: typing.Self, arg: int | str) -> int | str: ...
3525+
def u(self: typing.Self, arg: int | str) -> int | str:
3526+
return None
35263527

35273528
@u.register
35283529
def _(self: typing.Self, arg: int) -> int:
35293530
return arg
35303531

35313532
a = A()
35323533
self.assertEqual(a.u(42), 42)
3533-
self.assertEqual(a.u("hello"), "hello")
3534+
self.assertEqual(a.u("hello"), None)
35343535

35353536

35363537
class CachedCostItem:

0 commit comments

Comments
 (0)