Download tests/test_run_cli.py from 42e/mathcompose: direct link, hf CLI and curl.
- Browser
- Download file 789 Bytes
-
https://huggingface.co/42e/mathcompose/resolve/ca5eeebef012b49d221da68dddbc4ccfd0266c63/tests/test_run_cli.py
- Command line
-
hf download hf://42e/mathcompose@ca5eeebef012b49d221da68dddbc4ccfd0266c63/tests/test_run_cli.py
-
curl -L -o test_run_cli.py https://huggingface.co/42e/mathcompose/resolve/ca5eeebef012b49d221da68dddbc4ccfd0266c63/tests/test_run_cli.py
789 Bytes
| """The eval CLI defaults to `processbench` when no subcommand is named.""" | |
| from mathcompose.eval.run import _default_subcommand | |
| def test_inserts_processbench_when_missing(): | |
| assert _default_subcommand(["--adapter", "X", "--code-exec"]) == \ | |
| ["processbench", "--adapter", "X", "--code-exec"] | |
| def test_keeps_base_id_before_subcommand(): | |
| assert _default_subcommand(["--base-id", "Y", "--adapter", "X"]) == \ | |
| ["--base-id", "Y", "processbench", "--adapter", "X"] | |
| assert _default_subcommand(["--base-id=Y", "--adapter", "X"]) == \ | |
| ["--base-id=Y", "processbench", "--adapter", "X"] | |
| def test_leaves_explicit_subcommand_alone(): | |
| for argv in (["processbench", "--adapter", "X"], ["report"], ["-h"], []): | |
| assert _default_subcommand(argv) == argv | |