Skip to content

Fix sdist test collection failure for dragon.py#423

Merged
blink1073 merged 2 commits intoCalysto:mainfrom
blink1073:fix-test-sdist
Mar 25, 2026
Merged

Fix sdist test collection failure for dragon.py#423
blink1073 merged 2 commits intoCalysto:mainfrom
blink1073:fix-test-sdist

Conversation

@blink1073
Copy link
Copy Markdown
Contributor

References

Description

metakernel/images/dragon.py is a logo-generation script that imports optional Graphics and Myro packages at the top level. During the sdist test, pytest was collecting it as a module (due to --doctest-modules), failing immediately with ImportError: No module named 'Graphics' and interrupting the entire test run.

Changes

  • Added collect_ignore_glob = ["metakernel/images/*.py"] to conftest.py to exclude logo-generation scripts from pytest collection

Backwards-incompatible changes

None

Testing

The sdist test was failing with Interrupted: 1 error during collection. This change prevents collection of dragon.py.

AI usage

  • Some or all of the content of this PR was generated by AI.
  • The human author has carefully reviewed this PR and run this code.
  • AI tools and models used: Claude Sonnet 4.6 (Claude Code)

Exclude metakernel/images/*.py from pytest collection via
collect_ignore_glob so dragon.py (a logo-generation script requiring
optional Graphics/Myro packages) doesn't cause an ImportError during
test collection.
@blink1073 blink1073 added the bug label Mar 25, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.81%. Comparing base (7f0f014) to head (c44601a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #423      +/-   ##
==========================================
+ Coverage   90.30%   90.81%   +0.50%     
==========================================
  Files          51       51              
  Lines        2950     2950              
  Branches      414      414              
==========================================
+ Hits         2664     2679      +15     
+ Misses        209      190      -19     
- Partials       77       81       +4     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

conftest.py is not included in the sdist, so collect_ignore_glob had
no effect. Setting norecursedirs = ["images"] in pyproject.toml (which
is always present in the sdist) ensures dragon.py is never collected.
@blink1073 blink1073 enabled auto-merge (squash) March 25, 2026 20:07
@blink1073 blink1073 merged commit acd0085 into Calysto:main Mar 25, 2026
23 checks passed
@blink1073 blink1073 deleted the fix-test-sdist branch March 25, 2026 20:12
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