File size: 353 Bytes
2dd5f57 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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"
)
|