Download source/tests/utils.py from khazic/spec-b300: direct link, hf CLI and curl.
- Browser
- Download file 353 Bytes
-
https://huggingface.co/khazic/spec-b300/resolve/main/source/tests/utils.py
- Command line
-
hf download hf://khazic/spec-b300/source/tests/utils.py
-
curl -L -o utils.py https://huggingface.co/khazic/spec-b300/resolve/main/source/tests/utils.py
353 Bytes
| import os | |
| from collections.abc import Callable | |
| import pytest | |
| def requires_cadence(cadence: str | list[str]) -> Callable: | |
| cadence = [cadence] if isinstance(cadence, str) else cadence | |
| current_cadence = os.environ.get("CADENCE", "commit") | |
| return pytest.mark.skipif( | |
| (current_cadence not in cadence), reason="cadence mismatch" | |
| ) | |