Spaces:
Running
Running
Download tests/test_program_loader.py from yaswanth169/APISHIFT: direct link, hf CLI and curl.
- Browser
- Download file 695 Bytes
-
https://huggingface.co/spaces/yaswanth169/APISHIFT/resolve/main/tests/test_program_loader.py
- Command line
-
hf download hf://spaces/yaswanth169/APISHIFT/tests/test_program_loader.py
-
curl -L -o test_program_loader.py https://huggingface.co/spaces/yaswanth169/APISHIFT/resolve/main/tests/test_program_loader.py
695 Bytes
| """ProgramLoader tests.""" | |
| from server.program_loader import ProgramLoader | |
| def test_loader_returns_setup_section_at_start(): | |
| loader = ProgramLoader("apishift_program.md") | |
| section = loader.section_for_step(last_command="", steps_taken=0) | |
| assert "Setup" in section or "1." in section | |
| def test_loader_returns_section_for_command(): | |
| loader = ProgramLoader("apishift_program.md") | |
| section = loader.section_for_step(last_command="dispatch_test", steps_taken=4) | |
| assert "Failure" in section or "4." in section | |
| def test_loader_handles_missing_file(tmp_path): | |
| loader = ProgramLoader(str(tmp_path / "nope.md")) | |
| assert loader.section_for_step("dispatch_diff", 1) == "" | |