Skip to content

Commit 909c48e

Browse files
committed
gh-152315: Cover bound self method call
1 parent 2b80cb2 commit 909c48e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/test/test_call.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,10 @@ def test_unbound_method_with_self_keeps_missing_argument_error(self):
10141014
with self.check_raises_type_error(msg):
10151015
Dog.sit()
10161016

1017+
def test_instance_method_with_self_works(self):
1018+
"""Calling an instance method with self bound should still work."""
1019+
self.assertIsNone(Dog().sit())
1020+
10171021
def test_classmethod_missing_cls_does_not_suggest_missing_self(self):
10181022
"""A classmethod missing cls conceptually should not suggest self."""
10191023
msg = "Dog.register_breed() takes 1 positional argument but 2 were given"

0 commit comments

Comments
 (0)