Files
SmartThings-Local/tests/conftest.py
T
Marc Billow 8a6bc8d594 test: verify protocol/ + ocf/ import in isolation from mqtt_demo/
- Add test_import_isolation.py: isolation test that copies protocol/ and ocf/
  to a temp directory without mqtt_demo/ and verifies all modules import
- Add conftest.py: pytest configuration to add repo root to sys.path,
  enabling tests to import protocol/ and ocf/ packages
2026-07-04 17:29:22 -05:00

8 lines
239 B
Python

import sys
from pathlib import Path
# Ensure repo root is on sys.path so that protocol/ and ocf/ can be imported
repo_root = Path(__file__).resolve().parent.parent
if str(repo_root) not in sys.path:
sys.path.insert(0, str(repo_root))