mirror of
https://github.com/codeflash-ai/codeflash.git
synced 2026-05-04 18:25:17 +00:00
Merge pull request #2014 from codeflash-ai/feat/show-logo-on-help
feat: display logo when running `codeflash --help`
This commit is contained in:
commit
2054796acd
2 changed files with 20 additions and 0 deletions
|
|
@ -31,6 +31,8 @@ def main() -> None:
|
||||||
|
|
||||||
from codeflash.cli_cmds.cli import parse_args
|
from codeflash.cli_cmds.cli import parse_args
|
||||||
|
|
||||||
|
if "--help" in sys.argv[1:] or "-h" in sys.argv[1:]:
|
||||||
|
print_codeflash_banner()
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
|
|
||||||
# Auth commands skip banner, telemetry, and version check entirely
|
# Auth commands skip banner, telemetry, and version check entirely
|
||||||
|
|
|
||||||
18
tests/test_help_banner.py
Normal file
18
tests/test_help_banner.py
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
def test_help_displays_logo() -> None:
|
||||||
|
result = subprocess.run(
|
||||||
|
[sys.executable, "-c", "from codeflash.main import main; main()", "--help"], capture_output=True, text=True
|
||||||
|
)
|
||||||
|
assert result.returncode == 0
|
||||||
|
assert "codeflash.ai" in result.stdout
|
||||||
|
|
||||||
|
|
||||||
|
def test_help_short_flag_displays_logo() -> None:
|
||||||
|
result = subprocess.run(
|
||||||
|
[sys.executable, "-c", "from codeflash.main import main; main()", "-h"], capture_output=True, text=True
|
||||||
|
)
|
||||||
|
assert result.returncode == 0
|
||||||
|
assert "codeflash.ai" in result.stdout
|
||||||
Loading…
Reference in a new issue