Spaces:
Running
Running
Download tests/test_cli.py from pedrorezende/multi-agent-sdlc: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/spaces/pedrorezende/multi-agent-sdlc/resolve/main/tests/test_cli.py
- Command line
-
hf download hf://spaces/pedrorezende/multi-agent-sdlc/tests/test_cli.py
-
curl -L -o test_cli.py https://huggingface.co/spaces/pedrorezende/multi-agent-sdlc/resolve/main/tests/test_cli.py
1.05 kB
| from pathlib import Path | |
| import pytest | |
| from multi_agent_sdlc.cli import parse_args | |
| def test_parse_args_selects_project_description() -> None: | |
| args = parse_args( | |
| [ | |
| "--project-description", | |
| "project_descriptions/url_shortener.md", | |
| ] | |
| ) | |
| assert args.project_description == Path("project_descriptions/url_shortener.md") | |
| assert args.resume is None | |
| def test_parse_args_selects_workflow_to_resume() -> None: | |
| args = parse_args( | |
| [ | |
| "--resume", | |
| "thread-id", | |
| "--checkpoint-id", | |
| "checkpoint-id", | |
| ] | |
| ) | |
| assert args.resume == "thread-id" | |
| assert args.checkpoint_id == "checkpoint-id" | |
| assert args.project_description is None | |
| def test_parse_args_rejects_checkpoint_without_resume() -> None: | |
| with pytest.raises(SystemExit): | |
| parse_args( | |
| [ | |
| "--project-description", | |
| "project.md", | |
| "--checkpoint-id", | |
| "checkpoint-id", | |
| ] | |
| ) | |