Skip to content

Commit c2d9c30

Browse files
committed
chore: rename cli module to __main__ so it can be executed without having to build
1 parent 7902555 commit c2d9c30

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ dev = [
4444
]
4545

4646
[project.scripts]
47-
gitingest = "gitingest.cli:main"
47+
gitingest = "gitingest.__main__:main"
4848

4949
[project.urls]
5050
homepage = "https://gitingest.com"
File renamed without changes.

tests/test_cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pytest
99
from click.testing import CliRunner, Result
1010

11-
from gitingest.cli import main
11+
from gitingest.__main__ import main
1212
from gitingest.config import MAX_FILE_SIZE, OUTPUT_FILE_NAME
1313

1414

@@ -72,8 +72,8 @@ 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/cli.py" in result.stdout, (
76-
"Expected content (e.g., src/gitingest/cli.py) 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"
7777
)
7878
assert not output_file.exists(), f"Output file {output_file} was unexpectedly created."
7979

0 commit comments

Comments
 (0)