summaryrefslogtreecommitdiff
path: root/tests/unit/test_wxui_radiothread.py
diff options
context:
space:
mode:
authorDave Hibberd <d@vehibberd.com>2023-10-16 21:37:27 +0100
committerDave Hibberd <d@vehibberd.com>2023-10-16 21:37:27 +0100
commit91dbf844ad923e3c4bca1252dd104d8fc8ce5475 (patch)
tree93c4db659daf278db034b304e4cd910454504ec1 /tests/unit/test_wxui_radiothread.py
parent6f19923a918f7fb63a444b0c99950fdbe9d2f74c (diff)
New upstream version 20231016upstream/20231016
Diffstat (limited to 'tests/unit/test_wxui_radiothread.py')
-rw-r--r--tests/unit/test_wxui_radiothread.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/unit/test_wxui_radiothread.py b/tests/unit/test_wxui_radiothread.py
index c60da8c..99f9438 100644
--- a/tests/unit/test_wxui_radiothread.py
+++ b/tests/unit/test_wxui_radiothread.py
@@ -4,8 +4,10 @@ from unittest import mock
sys.modules['wx'] = wx = mock.MagicMock()
-from tests.unit import base
-from chirp.wxui import radiothread
+# These need to be imported after the above mock so that we don't require
+# wx to be present for these tests
+from tests.unit import base # noqa
+from chirp.wxui import radiothread # noqa
class TestRadioThread(base.BaseTest):
@@ -85,9 +87,9 @@ class TestRadioThread(base.BaseTest):
editor = mock.MagicMock()
thread = radiothread.RadioThread(radio)
mem = mock.MagicMock()
- job1id = thread.submit(editor, 'get_memory', 12)
- job2id = thread.submit(editor, 'set_memory', mem)
- job3id = thread.submit(editor, 'get_features')
+ thread.submit(editor, 'get_memory', 12)
+ thread.submit(editor, 'set_memory', mem)
+ thread.submit(editor, 'get_features')
thread.end()
# We have to start the thread after we submit the main jobs so
# the order is stable for comparison.