from __future__ import annotations
import pytest
def _has_pytmatrix() -> bool:
try:
import pytmatrix from pytmatrix.tmatrix import Scatterer except Exception:
return False
return True
HAS_PYTMATRIX = _has_pytmatrix()
@pytest.fixture
def skip_if_no_pytmatrix():
if not HAS_PYTMATRIX:
pytest.skip("pytmatrix not available — parity test skipped.")