@@ -40,18 +40,17 @@ def _seed_base_dir(tmp_path: Path) -> Path:
4040 project_dir = tmp_path / "test-project"
4141 project_dir .mkdir (parents = True )
4242 dest = project_dir / "session_abc123.jsonl"
43- dest .write_text (
44- (FIXTURES / "session_minimal.jsonl" ).read_text (encoding = "utf-8" ),
45- encoding = "utf-8" ,
46- )
43+ content = (FIXTURES / "session_minimal.jsonl" ).read_text (encoding = "utf-8" )
44+ content = content .replace ("demo-project" , "test-project" )
45+ dest .write_text (content , encoding = "utf-8" )
4746 return tmp_path
4847
4948
5049def test_cli_list_exits_zero (tmp_path ):
5150 base = _seed_base_dir (tmp_path )
5251 proc = _run_cli (["list" , "--base-dir" , str (base )])
5352 assert proc .returncode == 0
54- assert "test-project" in proc .stdout or "Project" in proc . stdout
53+ assert "test-project" in proc .stdout . lower ()
5554
5655
5756def test_cli_list_unknown_project_exits_zero_with_message (tmp_path ):
@@ -70,6 +69,8 @@ def test_cli_stats_exits_zero(tmp_path):
7069def test_cli_invalid_since_exits_nonzero ():
7170 proc = _run_cli (["--since" , "yesterday" ])
7271 assert proc .returncode != 0
72+ assert "--since" in proc .stderr
73+ assert "invalid choice" in proc .stderr .lower ()
7374
7475
7576def test_cli_export_creates_output (tmp_path ):
0 commit comments