summaryrefslogtreecommitdiff
path: root/tests/test_detect.py
diff options
context:
space:
mode:
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__):