Spaces:
Configuration error
Configuration error
Download evaluation/regression/cases/hello-world/test_hello_world.py from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 652 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/evaluation/regression/cases/hello-world/test_hello_world.py
- Command line
-
hf download hf://spaces/flyingdarkdev/README/evaluation/regression/cases/hello-world/test_hello_world.py
-
curl -L -o test_hello_world.py https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/evaluation/regression/cases/hello-world/test_hello_world.py
652 Bytes
| import os | |
| import pytest | |
| from conftest import agents | |
| def test_hello_world(task_file, run_test_case, agent): | |
| """Test case for the "Hello, World!" Bash script using different agents.""" | |
| # Run the test case for the specified agent | |
| workspace_dir = run_test_case(agent, 'hello-world') | |
| # Validate the generated workspace | |
| assert os.path.exists(workspace_dir) | |
| assert os.path.isfile(os.path.join(workspace_dir, 'hello_world.sh')) | |
| # Execute the hello_world.sh script | |
| os.chdir(workspace_dir) | |
| output = os.popen('bash hello_world.sh').read() | |
| assert output == 'Hello, World!\n' | |