File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import unittest
99
1010from 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
1430class 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 :
You can’t perform that action at this time.
0 commit comments