Download tests/test_cli.py from jbilcke/timestral-coreai: direct link, hf CLI and curl.
- Browser
- Download file 916 Bytes
-
https://huggingface.co/jbilcke/timestral-coreai/resolve/main/tests/test_cli.py
- Command line
-
hf download hf://jbilcke/timestral-coreai/tests/test_cli.py
-
curl -L -o test_cli.py https://huggingface.co/jbilcke/timestral-coreai/resolve/main/tests/test_cli.py
916 Bytes
| """CLI defaults are parsed without importing export frameworks or running models.""" | |
| import importlib | |
| import pytest | |
| def test_no_variants_defaults_to_all_four(script): | |
| module = importlib.import_module(f"scripts.{script}") | |
| assert module.parse_args([]).variants == ["5M", "28M", "123M", "209M"] | |
| def test_explicit_variant_selection_is_preserved(script): | |
| module = importlib.import_module(f"scripts.{script}") | |
| assert module.parse_args(["28M", "5M"]).variants == ["28M", "5M"] | |
| def test_unknown_variant_is_rejected(script): | |
| module = importlib.import_module(f"scripts.{script}") | |
| with pytest.raises(SystemExit) as error: | |
| module.parse_args(["7M"]) | |
| assert error.value.code == 2 | |