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.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/unit/test_qt_machinery.py b/tests/unit/test_qt_machinery.py
index ed1e53aa7..386081f5d 100644
--- a/tests/unit/test_qt_machinery.py
+++ b/tests/unit/test_qt_machinery.py
@@ -68,9 +68,9 @@ def test_importerror_exceptions(exception: Exception):
raise exception
-def test_selectioninfo_set_module():
+def test_selectioninfo_set_module_error():
info = machinery.SelectionInfo()
- info.set_module("PyQt5", "ImportError: Python imploded")
+ info.set_module_error("PyQt5", ImportError("Python imploded"))
assert info == machinery.SelectionInfo(
wrapper=None,
reason=machinery.SelectionReason.unknown,
@@ -79,6 +79,17 @@ def test_selectioninfo_set_module():
)
+def test_selectioninfo_use_wrapper():
+ info = machinery.SelectionInfo()
+ info.use_wrapper("PyQt6")
+ assert info == machinery.SelectionInfo(
+ wrapper="PyQt6",
+ reason=machinery.SelectionReason.unknown,
+ pyqt5=None,
+ pyqt6="success",
+ )
+
+
@pytest.mark.parametrize(
"info, expected",
[