Skip to content

Commit 392506a

Browse files
committed
test: address copilot review nits
1 parent 2dd086b commit 392506a

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

tests/integrations/test_integration_state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import json
44

5-
from specify_cli.integration_state import INTEGRATION_JSON
65
from specify_cli.integration_state import (
6+
INTEGRATION_JSON,
77
default_integration_key,
88
integration_setting,
99
normalize_integration_state,

tests/integrations/test_integration_subcommand.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ def _write_invalid_manifest(project, key):
3737
return manifest
3838

3939

40+
def _integration_list_row_cells(output: str, key: str) -> list[str]:
41+
row = next(line for line in output.splitlines() if line.startswith(f"│ {key}"))
42+
return [cell.strip() for cell in row.split("│")[1:-1]]
43+
44+
4045
# ── list ─────────────────────────────────────────────────────────────
4146

4247

@@ -87,10 +92,8 @@ def test_list_shows_multi_install_safe_status(self, tmp_path):
8792
assert result.exit_code == 0
8893
assert "Multi-install" in result.output
8994
assert "Safe" in result.output
90-
claude_row = next(line for line in result.output.splitlines() if line.startswith("│ claude"))
91-
copilot_row = next(line for line in result.output.splitlines() if line.startswith("│ copilot"))
92-
assert claude_row.rstrip().endswith("│ yes │")
93-
assert copilot_row.rstrip().endswith("│ no │")
95+
assert _integration_list_row_cells(result.output, "claude")[-1] == "yes"
96+
assert _integration_list_row_cells(result.output, "copilot")[-1] == "no"
9497

9598

9699
# ── install ──────────────────────────────────────────────────────────

0 commit comments

Comments
 (0)