conftest.py 914 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # -*- coding: utf-8 -*-
  2. """
  3. Pytest-Konfiguration für Plugin-Tests.
  4. Diese Datei stellt sicher, dass Plugin-Tests korrekt importiert werden,
  5. ohne mit dem Hauptverzeichnis tests/ zu kollidieren.
  6. """
  7. import sys
  8. from pathlib import Path
  9. # Projekt-Root zum Pfad hinzufügen
  10. PROJECT_ROOT = Path(__file__).parent.parent
  11. if str(PROJECT_ROOT) not in sys.path:
  12. sys.path.insert(0, str(PROJECT_ROOT))
  13. # Importiere alle Fixtures aus der Haupt-conftest.py
  14. from conftest import (
  15. event_manager,
  16. mock_event_manager,
  17. mock_application,
  18. mock_plugin_path,
  19. sample_audio_16khz,
  20. sample_audio_22khz,
  21. sample_audio_with_tone,
  22. default_tts_config,
  23. default_stt_config,
  24. plugin_test_helper,
  25. PluginTestHelper,
  26. )
  27. def pytest_configure(config):
  28. """Registriert zusätzliche Marker für Plugin-Tests."""
  29. config.addinivalue_line(
  30. "markers", "plugin: Plugin-spezifische Tests"
  31. )