File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1163,10 +1163,12 @@ class Bar(Foo):
1163
1163
z: Foo = Bar()
1164
1164
z.f(1, z=2)
1165
1165
z.f(1, 2, 3)
1166
+ # z.f(x=5) # Not tested because we (knowingly) do the wrong thing and pass it as positional
1166
1167
1167
1168
[out]
1168
1169
Bar (1,) {'z': 2}
1169
1170
Bar (1, 2, 3) {}
1171
+ --Bar () {'x': 5}
1170
1172
1171
1173
[case testMethodOverrideDefault8]
1172
1174
from typing import TypeVar, Any
@@ -1214,6 +1216,10 @@ z: Foo = Baz()
1214
1216
z.f()
1215
1217
z.f(y=1)
1216
1218
z.f(1, 2)
1219
+ # Not tested because we don't (and probably won't) match cpython here
1220
+ # from testutil import assertRaises
1221
+ # with assertRaises(TypeError):
1222
+ # z.f(x=7)
1217
1223
1218
1224
[out]
1219
1225
Baz 30 50
Original file line number Diff line number Diff line change @@ -78,7 +78,11 @@ class Bar(Foo):
78
78
z: Foo = Bar()
79
79
z.f(1, z=50)
80
80
z.f()
81
+ z.f(1)
82
+ z.f(z=50)
81
83
82
84
[out]
83
85
stuff (1,) {'z': 50}
84
86
stuff () {}
87
+ stuff (1,) {}
88
+ stuff () {'z': 50}
You can’t perform that action at this time.
0 commit comments