Skip to content

Gate python cli-output tests on deptry as well as ruff#64

Merged
devill merged 1 commit into
devill:mainfrom
LiinaSuoniemi:fix-python-test-deptry-gating
Jun 25, 2026
Merged

Gate python cli-output tests on deptry as well as ruff#64
devill merged 1 commit into
devill:mainfrom
LiinaSuoniemi:fix-python-test-deptry-gating

Conversation

@LiinaSuoniemi

Copy link
Copy Markdown
Contributor

What

Gate the two Python cases in src/cli-output.test.ts on deptry as well as ruff.

Why

The Python preset runs both ruff and deptry, but these cases were gated on ruff only (skipIf(!RUFF)). With ruff present and deptry missing, the "python clean run" case fails: deptry's spawn failure forces exit 1, while the case expects exit 0 on a clean project. python-acceptance.test.ts already gates on both tools for this reason; this brings cli-output.test.ts in line.

Changes

  • src/cli-output.test.ts: RUFFPY_TOOLS (ruff and deptry), and the two it.skipIf(!RUFF)it.skipIf(!PY_TOOLS).

Test-only, no production code touched.

Testing

On a clean main:

  • deptry hidden, before the change: "python clean run" fails (expected 0, got 1). Bug reproduced.
  • deptry present, after the change: both Python cases run and pass.
  • deptry hidden, after the change: both Python cases skip, nothing fails.
  • full suite green with ruff and deptry installed (501 passed).

@devill devill left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct root-caused gating fix: a missing deptry hits recordSpawnFailure -> sink.failures -> exit 1, so the clean-run case must require both tools to assert exit 0. Brings cli-output.test.ts in line with python-acceptance.test.ts. Test-only.

@devill devill merged commit 2a82be1 into devill:main Jun 25, 2026
2 checks passed
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.

2 participants