summaryrefslogtreecommitdiff
path: root/tests/test_detect.py
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2024-02-24 13:47:27 +0000
committerDave Hibberd <hibby@debian.org>2024-02-24 13:47:27 +0000
commitfc438e6a84402e621877f6c30097442af46f122b (patch)
tree7a6ca4af4159368f92d10c6c932c4b5e662715aa /tests/test_detect.py
parent99bce70f3ca5cea0eb28f5158cfa00803cf6a19a (diff)
New upstream version 20240224upstream/20240224
Diffstat (limited to 'tests/test_detect.py')
-rw-r--r--tests/test_detect.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_detect.py b/tests/test_detect.py
index 5a94cb9..8acad47 100644
--- a/tests/test_detect.py
+++ b/tests/test_detect.py
@@ -5,12 +5,17 @@ from unittest import mock
import pytest
from chirp import directory
+from chirp import logger
from tests import base
class TestCaseDetect(base.DriverTest):
def test_detect(self):
- radio = directory.get_radio_by_image(self.TEST_IMAGE)
+ with logger.log_history(logging.WARNING, 'chirp.drivers') as history:
+ radio = directory.get_radio_by_image(self.TEST_IMAGE)
+ self.assertEqual([], history.get_history(),
+ 'Drivers should not log warnings/errors for '
+ 'good images')
if hasattr(radio, '_orig_rclass'):
radio = radio._orig_rclass(self.TEST_IMAGE)
if isinstance(self.radio, radio.__class__):