diff --git a/libervia/backend/core/exceptions.py b/libervia/backend/core/exceptions.py index 27126069..e48b8d48 100644 --- a/libervia/backend/core/exceptions.py +++ b/libervia/backend/core/exceptions.py @@ -54,7 +54,7 @@ class UnknownGroupError(Exception): pass -class MissingModule(Exception): +class MissingModule(ImportError): # Used to indicate when a plugin dependence is not found # it's nice to indicate when to find the dependence in argument string pass diff --git a/tests/unit/cli/test_calls.py b/tests/unit/cli/test_calls.py index f25881d3..6190213d 100644 --- a/tests/unit/cli/test_calls.py +++ b/tests/unit/cli/test_calls.py @@ -20,11 +20,16 @@ from unittest.mock import MagicMock, patch import pytest try: + from libervia import media + import webrtc from libervia.cli.call_gui import AVCallUI from libervia.frontends.tools import display_servers from PyQt6.QtWidgets import QApplication -except ModuleNotFoundError: - pytest.skip("PyQt6 is not available.", allow_module_level=True) +except ImportError as e: + pytest.skip( + f"Required dependencies not available ({type(e).__name__}: {e}).", + allow_module_level=True, + ) @pytest.fixture(scope="session")