Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/test_claude_current.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,18 @@ def test_help_and_an_unknown_argument(box):
assert "unknown argument: --bogus" in result.stderr


@pytest.mark.parametrize("flag", ["--help", "-h"])
@pytest.mark.parametrize("name", ["TIMEOUT", "VERSION_TIMEOUT", "UPDATE_TIMEOUT", "LOCK_WAIT"])
def test_help_precedes_malformed_bounds_without_running_tools(box, flag, name):
result = box.run(flag, **{f"CLAUDE_CURRENT_{name}": "not-a-number"})
assert result.returncode == 0, result.stderr
assert result.stdout.startswith("claude-current [--porcelain] [--offline]\n")
assert result.stderr == ""
assert box.npm_log.read_text() == ""
assert box.node_log.read_text() == ""
assert box.claude_log.read_text() == ""


@pytest.mark.parametrize("name", ["TIMEOUT", "VERSION_TIMEOUT", "UPDATE_TIMEOUT", "LOCK_WAIT"])
def test_a_malformed_bound_is_refused_before_anything_runs(box, name):
"""64, the usage status, and not 1: a launcher reports 1 as "no Claude
Expand Down
Loading