Skip to content

Commit 2b7922d

Browse files
Update tests/test_cli.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c2d9c30 commit 2b7922d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ def test_cli_with_stdout_output() -> None:
7272
# ─── core expectations (stdout) ────────────────────────────────────-
7373
assert result.exit_code == 0, f"CLI exited with code {result.exit_code}, stderr: {result.stderr}"
7474
assert "---" in result.stdout, "Expected file separator '---' not found in STDOUT"
75-
assert "src/gitingest/__main__.py" in result.stdout, (
76-
"Expected content (e.g., src/gitingest/__main__.py) not found in STDOUT"
75+
expected_path = str(Path(main.__module__.__file__).relative_to(Path.cwd()))
76+
assert expected_path in result.stdout, (
77+
f"Expected content (e.g., {expected_path}) not found in STDOUT"
7778
)
7879
assert not output_file.exists(), f"Output file {output_file} was unexpectedly created."
7980

0 commit comments

Comments
 (0)