SXXXXXXX_PyUCC/tests/conftest.py

24 lines
732 B
Python

"""
Pytest configuration file for PyUCC tests.
This file sets up the Python path to include the project root and
external submodules before running tests.
"""
import sys
import os
# Get the project root directory
project_root = os.path.dirname(os.path.dirname(__file__))
# Add project root to Python path (so pyucc can be imported)
if project_root not in sys.path:
sys.path.insert(0, project_root)
# Add external modules to path for tests
external_base = os.path.join(project_root, "external")
for module in ["python-resource-monitor", "python-tkinter-logger"]:
module_path = os.path.join(external_base, module)
if os.path.isdir(module_path) and module_path not in sys.path:
sys.path.insert(0, module_path)