"""conftest.py — shared fixtures for companion plugin tests.
This file is picked up automatically by pytest for every ``tests/``
subdirectory under ``wolfhece/_builtin_plugins/``. It adds the plugin's own
directory to ``sys.path`` so that ``companion.py`` can be imported simply as
``import companion`` (or ``from companion import <ClassName>``).
"""
import sys
from pathlib import Path
# The plugin root is one level above this conftest.py (i.e. the directory
# that contains companion.py and plugin.toml).
[docs]
_PLUGIN_DIR = Path(__file__).parent.parent
if str(_PLUGIN_DIR) not in sys.path:
sys.path.insert(0, str(_PLUGIN_DIR))