There was an error while loading. Please reload this page.
1 parent 266a87e commit f6b4c69Copy full SHA for f6b4c69
1 file changed
Lib/test/test_call.py
@@ -978,6 +978,9 @@ def method_one_arg_named_self(self):
978
def method_one_arg_named_cls(cls):
979
pass
980
981
+ def method_two_arg_second_param_self(arg1, self):
982
+ pass
983
+
984
985
class AMeta(type):
986
@@ -1121,6 +1124,11 @@ def test_when_arg_named_cls_does_not_suggest(self):
1121
1124
A().method_one_arg_named_cls("arg1")
1122
1125
self.assertNotIn("Did you forget", str(cm.exception))
1123
1126
1127
+ def test_when_second_param_is_self(self):
1128
+ with self.assertRaises(TypeError) as cm:
1129
+ A().method_two_arg_second_param_self()
1130
+ self.assertNotIn("Did you forget", str(cm.exception))
1131
1132
1133
@cpython_only
1134
class TestErrorMessagesSuggestions(unittest.TestCase):
0 commit comments