Skip to content

Duplicates-tool test passes without Node.js - #655

Merged
guijacquemet merged 1 commit into
mainfrom
claude/duplicates-test-without-node
Nov 28, 2026
Merged

guijacquemet merged 1 commit into
mainfrom
claude/duplicates-test-without-node

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

What

tests/test_duplicates_tool.py::test_a_pass_that_cannot_run_is_skipped_with_its_reason failed on a machine without Node.js, found by the whole-suite run after #653 and #654 (it fails the same way on 9fa2402, before them).

jscpd_review.run_pass checks for npx before it checks for the semantic model. Without Node.js the tool rightly reports skipped: npx not found, while the test's first half expected not downloaded. The test now stands in for npx (shutil.which) in that half, just as its second half already stands in for its absence. It no longer depends on what is installed, and the tool is unchanged.

Local gate

pytest -n 0 tests/test_guards.py tests/test_function_guards.py tests/test_function_tools.py
102 passed, 1 warning in 51.65s
python tools/audit.py --check-against origin/main
baselines only tightened against origin/main

Also run: tests/test_duplicates_tool.py (30 passed, here without Node.js); ruff check and ruff format --check on src tests data (clean).

🤖 Generated with Claude Code

test_a_pass_that_cannot_run_is_skipped_with_its_reason expected "not downloaded"
from the semantic pass, which jscpd_review only reaches when npx is on the PATH. On a
machine without Node.js the tool rightly said "npx not found" first and the test
failed. The test now stands in for npx in that step, as it already did for its
absence in the next one, so it passes with or without Node.js.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@guijacquemet
guijacquemet merged commit 5c5f582 into main Nov 28, 2026
2 checks passed
@guijacquemet
guijacquemet deleted the claude/duplicates-test-without-node branch November 28, 2026 20:02
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