Skip to content

Commit 107ada9

Browse files
committed
Fix test
1 parent 058f314 commit 107ada9

1 file changed

Lines changed: 37 additions & 1 deletion

File tree

mypyc/test/test_cheader.py

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,23 @@
88
import unittest
99

1010
from mypyc.ir.deps import SourceDep
11-
from mypyc.primitives import registry
11+
from mypyc.ir.ops import PrimitiveDescription
12+
from mypyc.primitives import (
13+
bytearray_ops,
14+
bytes_ops,
15+
dict_ops,
16+
exc_ops,
17+
float_ops,
18+
generic_ops,
19+
int_ops,
20+
list_ops,
21+
misc_ops,
22+
registry,
23+
set_ops,
24+
str_ops,
25+
tuple_ops,
26+
weakref_ops,
27+
)
1228

1329

1430
class TestHeaderInclusion(unittest.TestCase):
@@ -35,6 +51,26 @@ def check_name(name: str) -> None:
3551
for ops in values:
3652
all_ops.extend(ops)
3753

54+
for module in [
55+
bytes_ops,
56+
str_ops,
57+
dict_ops,
58+
list_ops,
59+
bytearray_ops,
60+
generic_ops,
61+
int_ops,
62+
misc_ops,
63+
tuple_ops,
64+
exc_ops,
65+
float_ops,
66+
set_ops,
67+
weakref_ops,
68+
]:
69+
for name in dir(module):
70+
val = getattr(module, name, None)
71+
if isinstance(val, PrimitiveDescription):
72+
all_ops.append(val)
73+
3874
# Find additional headers via extra C source file dependencies.
3975
for op in all_ops:
4076
if op.dependencies:

0 commit comments

Comments
 (0)