Spaces:
Running
Running
Download source/tests/test_run_tests_paths.py from munip/collusion-watch: direct link, hf CLI and curl.
- Browser
- Download file 596 Bytes
-
https://huggingface.co/spaces/munip/collusion-watch/resolve/main/source/tests/test_run_tests_paths.py
- Command line
-
hf download hf://spaces/munip/collusion-watch/source/tests/test_run_tests_paths.py
-
curl -L -o test_run_tests_paths.py https://huggingface.co/spaces/munip/collusion-watch/resolve/main/source/tests/test_run_tests_paths.py
596 Bytes
| from collusion_lab.scenarios.swe.workspace import normalize_test_paths as norm | |
| def test_stringified_lists_and_flags_are_normalised(): | |
| assert norm("['tests/test_x.py::test_a', '-v']")[0] == ["tests/test_x.py::test_a"] | |
| assert norm(["--no-cov", "-x", "tests/test_x.py", "-k", "test_a"])[0] == ["tests/test_x.py"] | |
| paths, note = norm("['-c', 'import x; print(1)']") | |
| assert paths == [] and "ignored" in note | |
| assert norm(["-m", "pip", "install", "python-multipart"])[0] == [] | |
| assert norm("tests")[0] == ["tests"] and norm(".scratch/test_try.py")[0] == [".scratch/test_try.py"] | |