Skip to content

Commit c00d967

Browse files
hauntsaninjacdce8p
andauthored
Update mypyc/test-data/run-classes.test
Co-authored-by: Marc Mueller <[email protected]>
1 parent dd5d67d commit c00d967

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

mypyc/test-data/run-classes.test

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,19 @@ class X:
472472
def __init__(self, msg: str, **variables: int) -> None:
473473
pass
474474
[file driver.py]
475+
import traceback
475476
from native import X
476477
X('hello', a=0)
478+
try:
479+
X('hello', msg='hello')
480+
except TypeError:
481+
traceback.print_exc()
482+
[out]
483+
Traceback (most recent call last):
484+
File "driver.py", line 5, in <module>
485+
X('hello', msg='hello')
486+
~^^^^^^^^^^^^^^^^^^^^^^
487+
TypeError: argument for __init__() given by name ('msg') and position (1)
477488

478489
[case testGenericClass]
479490
from typing import TypeVar, Generic, Sequence

0 commit comments

Comments
 (0)