Skip to content

Add test to ensure multicall modules are loaded from compiled extensions#181

Open
BobTheBuidler wants to merge 4 commits intomasterfrom
codex/add-test-for-compiled-c-code-execution
Open

Add test to ensure multicall modules are loaded from compiled extensions#181
BobTheBuidler wants to merge 4 commits intomasterfrom
codex/add-test-for-compiled-c-code-execution

Conversation

@BobTheBuidler
Copy link
Collaborator

Motivation

  • Ensure the library is actually using compiled (mypy-compiled) extension modules when available instead of interpreted Python code.
  • Prevent regressions where packaging or import paths fall back to pure-Python files even when ext_modules are built.
  • Provide an automated assertion that key performance-sensitive modules are loaded as native extensions.

Description

  • Add tests/test_compiled.py which defines test_compiled_extensions_loaded to validate compiled loading.
  • The test imports multicall.call, multicall.constants, and multicall.multicall and inspects their __file__ paths.
  • It asserts each module file suffix is one of the values in importlib.machinery.EXTENSION_SUFFIXES to ensure they are extension modules.

Testing

  • No automated tests were executed as part of this change (tests were not run in the rollout).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant