Skip to content

Commit 7b4f862

Browse files
authored
[minor] improve getargs test (#18389)
Improves test added in #18350 to confirm the args are actually parsed correctly
1 parent 1161487 commit 7b4f862

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: mypyc/test-data/run-classes.test

+6-2
Original file line numberDiff line numberDiff line change
@@ -470,11 +470,15 @@ assert foo() == 21
470470
[case testClassKwargs]
471471
class X:
472472
def __init__(self, msg: str, **variables: int) -> None:
473-
pass
473+
self.msg = msg
474+
self.variables = variables
475+
474476
[file driver.py]
475477
import traceback
476478
from native import X
477-
X('hello', a=0)
479+
x = X('hello', a=0, b=1)
480+
assert x.msg == 'hello'
481+
assert x.variables == {'a': 0, 'b': 1}
478482
try:
479483
X('hello', msg='hello')
480484
except TypeError as e:

0 commit comments

Comments
 (0)