Skip to content

Fix monkeypatch style and remove unused sys import in tests#8

Merged
tbjers merged 2 commits into
mainfrom
ai-findings-autofix/tests-test_packer.py
Jun 6, 2026
Merged

Fix monkeypatch style and remove unused sys import in tests#8
tbjers merged 2 commits into
mainfrom
ai-findings-autofix/tests-test_packer.py

Conversation

@tbjers

@tbjers tbjers commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace runtime sys.modules[Packer.__module__] lookups in monkeypatch.setattr calls with the idiomatic pytest dotted-string form ("openscad_packer.packer.getASTfromString"), which patches the same binding more readably
  • Remove the now-unused import sys that was only needed by the old form

Test plan

  • uv run pytest tests/test_packer.py — all 61 tests pass

🤖 Generated with Claude Code

tbjers and others added 2 commits June 6, 2026 16:10
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.59%. Comparing base (28cd26e) to head (9a5faf0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #8   +/-   ##
=======================================
  Coverage   99.59%   99.59%           
=======================================
  Files           6        6           
  Lines         244      244           
  Branches       53       53           
=======================================
  Hits          243      243           
  Partials        1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@tbjers tbjers merged commit d9f1b8c into main Jun 6, 2026
9 checks passed
@tbjers tbjers deleted the ai-findings-autofix/tests-test_packer.py branch June 6, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant