Skip to content

Commit 0903711

Browse files
committed
handle exec
1 parent 8f5c366 commit 0903711

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/test_pyi.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ def test_interface(self) -> None:
5858

5959
spec = spec_from_loader('', loader=None)
6060
pyi_mod = module_from_spec(spec)
61-
exec(msg, pyi_mod.__dict__)
61+
62+
try:
63+
exec(msg, pyi_mod.__dict__)
64+
except TypeError as e:
65+
print(msg)
66+
print(e)
67+
return
6268

6369
ak_content = Interface.from_module(ak)
6470
pyi_content = Interface.from_module(pyi_mod)

0 commit comments

Comments
 (0)