MCPcopy Index your code
hub / github.com/github/spec-kit / test_detected_via_path

Method test_detected_via_path

tests/test_check_tool.py:53–62  ·  view source on GitHub ↗

claude on PATH (global npm install) should still work.

(self, tmp_path)

Source from the content-addressed store, hash-verified

51 assert check_tool("claude") is True
52
53 def test_detected_via_path(self, tmp_path):
54 """claude on PATH (global npm install) should still work."""
55 fake_missing = tmp_path / "nonexistent" / "claude"
56
57 with patch("specify_cli.CLAUDE_LOCAL_PATH", fake_missing), \
58 patch("specify_cli._utils.CLAUDE_LOCAL_PATH", fake_missing), \
59 patch("specify_cli.CLAUDE_NPM_LOCAL_PATH", fake_missing), \
60 patch("specify_cli._utils.CLAUDE_NPM_LOCAL_PATH", fake_missing), \
61 patch("shutil.which", return_value="/usr/local/bin/claude"):
62 assert check_tool("claude") is True
63
64 def test_not_found_when_nowhere(self, tmp_path):
65 """Should return False when claude is genuinely not installed."""

Callers

nothing calls this directly

Calls 1

check_toolFunction · 0.90

Tested by

no test coverage detected