"""Pytest config for the Python SDK.

These tests are sometimes invoked from the monorepo root (e.g. `pytest sdks/python/tests/...`)
without installing the SDK as a package first. Ensure `sdks/python/src` is on `sys.path`
so `import terminaluse` works in that scenario.
"""

from __future__ import annotations

import sys
from pathlib import Path


def pytest_configure() -> None:
    sdk_root = Path(__file__).resolve().parents[1]
    src_dir = sdk_root / "src"

    if src_dir.is_dir():
        src_str = str(src_dir)
        if src_str not in sys.path:
            sys.path.insert(0, src_str)
