otko/tests/conftest.py

22 lines
544 B
Python
Raw Permalink Normal View History

2026-09-08 02:12:15 -04:00
"""Shared pytest fixtures.
`pytest-qt` automatically provides a `qtbot` fixture and a QApplication
instance. We add convenience fixtures here as the suite grows.
"""
from __future__ import annotations
import pytest
@pytest.fixture(autouse=True)
def _isolate_opensees() -> None:
"""Reset OpenSees domain between tests if openseespy is importable.
Imported lazily so that pure-core tests don't pull in the C++ runtime.
"""
try:
import openseespy.opensees as ops
except ImportError:
return
ops.wipe()