summaryrefslogtreecommitdiff
path: root/tests/unit/test_qt_machinery.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test_qt_machinery.py')
-rw-r--r--tests/unit/test_qt_machinery.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/unit/test_qt_machinery.py b/tests/unit/test_qt_machinery.py
index 25fc83ffd..cf7990393 100644
--- a/tests/unit/test_qt_machinery.py
+++ b/tests/unit/test_qt_machinery.py
@@ -9,7 +9,7 @@ import sys
import html
import argparse
import typing
-from typing import Any, Optional, List, Dict, Union
+from typing import Any, Optional, List, Dict, Union, Type
import dataclasses
import pytest
@@ -45,14 +45,14 @@ def undo_init(monkeypatch: pytest.MonkeyPatch) -> None:
@pytest.mark.parametrize(
- "exception",
+ "exception, base",
[
- machinery.Unavailable(),
- machinery.NoWrapperAvailableError(machinery.SelectionInfo()),
+ (machinery.Unavailable(), ModuleNotFoundError),
+ (machinery.NoWrapperAvailableError(machinery.SelectionInfo()), ImportError),
],
)
-def test_importerror_exceptions(exception: Exception):
- with pytest.raises(ImportError):
+def test_importerror_exceptions(exception: Exception, base: Type[Exception]):
+ with pytest.raises(base):
raise exception