"""Root conftest: add all package source directories to sys.path for pytest discovery."""

import pathlib
import sys

_root = pathlib.Path(__file__).parent
_packages = [
    "packages/node",
    "packages/gateway",
    "packages/tracker",
    "packages/sdk",
    "packages/contracts",
    "packages/p2p",
    "packages/relay",
    "packages/validator",
]

for _pkg in _packages:
    _path = str(_root / _pkg)
    if _path not in sys.path:
        sys.path.insert(0, _path)
