mirror of
https://github.com/codeflash-ai/codeflash.git
synced 2026-05-04 18:25:17 +00:00
Merge pull request #2120 from codeflash-ai/fix/test-help-banner-windows-utf8
fix: decode help-banner test subprocess output as UTF-8
This commit is contained in:
commit
1ba6af0a88
1 changed files with 8 additions and 2 deletions
|
|
@ -4,7 +4,10 @@ import sys
|
||||||
|
|
||||||
def test_help_displays_logo() -> None:
|
def test_help_displays_logo() -> None:
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
[sys.executable, "-c", "from codeflash.main import main; main()", "--help"], capture_output=True, text=True
|
[sys.executable, "-c", "from codeflash.main import main; main()", "--help"],
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
encoding="utf-8",
|
||||||
)
|
)
|
||||||
assert result.returncode == 0
|
assert result.returncode == 0
|
||||||
assert "codeflash.ai" in result.stdout
|
assert "codeflash.ai" in result.stdout
|
||||||
|
|
@ -12,7 +15,10 @@ def test_help_displays_logo() -> None:
|
||||||
|
|
||||||
def test_help_short_flag_displays_logo() -> None:
|
def test_help_short_flag_displays_logo() -> None:
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
[sys.executable, "-c", "from codeflash.main import main; main()", "-h"], capture_output=True, text=True
|
[sys.executable, "-c", "from codeflash.main import main; main()", "-h"],
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
encoding="utf-8",
|
||||||
)
|
)
|
||||||
assert result.returncode == 0
|
assert result.returncode == 0
|
||||||
assert "codeflash.ai" in result.stdout
|
assert "codeflash.ai" in result.stdout
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue