Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test
  • Loading branch information
JukkaL committed Jan 13, 2026
commit 107ada94a3473ff7c98f1d546a2fee3c3a6016b8
38 changes: 37 additions & 1 deletion mypyc/test/test_cheader.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,23 @@
import unittest

from mypyc.ir.deps import SourceDep
from mypyc.primitives import registry
from mypyc.ir.ops import PrimitiveDescription
from mypyc.primitives import (
bytearray_ops,
bytes_ops,
dict_ops,
exc_ops,
float_ops,
generic_ops,
int_ops,
list_ops,
misc_ops,
registry,
set_ops,
str_ops,
tuple_ops,
weakref_ops,
)


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

for module in [
bytes_ops,
str_ops,
dict_ops,
list_ops,
bytearray_ops,
generic_ops,
int_ops,
misc_ops,
tuple_ops,
exc_ops,
float_ops,
set_ops,
weakref_ops,
]:
for name in dir(module):
val = getattr(module, name, None)
if isinstance(val, PrimitiveDescription):
all_ops.append(val)

# Find additional headers via extra C source file dependencies.
for op in all_ops:
if op.dependencies:
Expand Down