Skip to content

Commit 95332b3

Browse files
committed
fixed failing tests
1 parent 19f3cbf commit 95332b3

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

.github/workflows/test_full.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
13+
python-version: ['3.10', '3.11', '3.12', '3.13']
1414

1515
steps:
1616
- uses: actions/checkout@v4

tests/test_ellar_cli_service.py

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,24 @@
1212
)
1313
from ellar_cli.service.pyproject import PY_PROJECT_TOML
1414

15-
good_app_info = (
16-
b"Usage: good_app.py [OPTIONS] COMMAND [ARGS]...\n\n "
17-
b"Ellar, ASGI Python Web framework\n\nOptions:\n --project TEXT "
18-
b"Run Specific Command on a specific project [default:\n "
19-
b"default]\n -v, --version Show the version and exit.\n --help "
20-
b"Show this message and exit.\n\nCommands:\n create-module - Scaffolds Ellar Application Module -\n "
21-
b"failing-1\n failing-2\n failing-3\n runserver - "
22-
b"Starts Uvicorn Server -\n working\n"
23-
)
15+
good_app_info = """Usage: good_app.py [OPTIONS] COMMAND [ARGS]...
16+
17+
Ellar, ASGI Python Web framework
18+
19+
Options:
20+
--project TEXT Run Specific Command on a specific project [default:
21+
default]
22+
-v, --version Show the version and exit.
23+
--help Show this message and exit.
24+
25+
Commands:
26+
create-module - Scaffolds Ellar Application Module -
27+
failing-1
28+
failing-2
29+
failing-3
30+
runserver - Starts Uvicorn Server -
31+
working
32+
"""
2433

2534

2635
def test_import_project_meta_returns_default_when_py_project_is_none(tmp_path):
@@ -194,9 +203,11 @@ def test_version_works(write_empty_py_project, process_runner):
194203

195204

196205
def test_apps_good_app_cli_works(change_os_dir):
197-
result = subprocess.run(["python", "apps/good_app.py"], stdout=subprocess.PIPE)
206+
result = subprocess.run(
207+
["python", "apps/good_app.py", "--help"], stdout=subprocess.PIPE
208+
)
198209
assert result.returncode == 0
199-
assert result.stdout == good_app_info
210+
assert result.stdout.decode("utf-8") == good_app_info
200211

201212

202213
def test_apps_good_app_working_command(change_os_dir):

0 commit comments

Comments
 (0)