From f6b2e6e7159906b8b3204dca3a9e58e42c36ccbb Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Thu, 27 Feb 2025 20:47:59 +0000 Subject: New upstream version 20250221 --- tests/__init__.py | 43 ++++++++- tests/__pycache__/__init__.cpython-310.pyc | Bin 3265 -> 4271 bytes tests/__pycache__/base.cpython-310.pyc | Bin 5318 -> 5375 bytes .../test_brute_force.cpython-310-pytest-7.1.3.pyc | Bin 5396 -> 6661 bytes .../test_edges.cpython-310-pytest-7.1.3.pyc | Bin 7385 -> 7719 bytes .../test_settings.cpython-310-pytest-7.1.3.pyc | Bin 2445 -> 2547 bytes tests/base.py | 5 +- tests/driver_xfails.yaml | 107 +++++++++++++++++++++ tests/images/Baofeng_UV-5R.img | Bin 6472 -> 6661 bytes tests/images/Icom_IC-F621-2.img | Bin 0 -> 12521 bytes tests/images/Kenwood_TK-280.img | Bin 0 -> 32957 bytes tests/images/Kenwood_TK-481.img | Bin 0 -> 32969 bytes tests/images/Kenwood_TK-880.img | Bin 0 -> 32989 bytes tests/images/Kenwood_TK-981.img | Bin 0 -> 33033 bytes tests/images/Radioddity_GA-510_V2.img | Bin 20673 -> 20673 bytes tests/images/Retevis_H777H_FRS.img | Bin 0 -> 1205 bytes tests/images/Retevis_RB626.img | Bin 0 -> 969 bytes tests/images/Yaesu_VX-7.img | Bin 16211 -> 16380 bytes tests/py3-untested-drivers.txt | 1 - tests/py3_driver_testers.txt | 2 + tests/test_brute_force.py | 31 ++++++ tests/test_edges.py | 16 +++ tests/test_settings.py | 3 + .../test_bitwise.cpython-310-pytest-7.1.3.pyc | Bin 16962 -> 18507 bytes .../test_repeaterbook.cpython-310-pytest-7.1.3.pyc | Bin 8032 -> 8070 bytes tests/unit/test_bitwise.py | 32 ++++++ tests/unit/test_chirp_common.py | 23 +++++ tests/unit/test_repeaterbook.py | 5 + 28 files changed, 263 insertions(+), 5 deletions(-) create mode 100644 tests/driver_xfails.yaml create mode 100644 tests/images/Icom_IC-F621-2.img create mode 100644 tests/images/Kenwood_TK-280.img create mode 100644 tests/images/Kenwood_TK-481.img create mode 100644 tests/images/Kenwood_TK-880.img create mode 100755 tests/images/Kenwood_TK-981.img create mode 100644 tests/images/Retevis_H777H_FRS.img create mode 100644 tests/images/Retevis_RB626.img (limited to 'tests') diff --git a/tests/__init__.py b/tests/__init__.py index d076136..b2563b8 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,9 +1,12 @@ +import functools import glob import logging import os +from types import FunctionType import unittest import pytest +import yaml from chirp import directory @@ -20,7 +23,28 @@ LOG = logging.getLogger('testadapter') class TestAdapterMeta(type): + """Generate a subclass of a TestCase for our radio. + + This wraps each of the test functions so they can be marked by pytest + independently. + + Only works with a single parent! + """ def __new__(cls, name, parents, dct): + for attrname, attr in list(parents[0].__dict__.items()): + if (isinstance(attr, FunctionType) and + attrname.startswith('test') and + not hasattr(attr, 'pytestmark')): + # This is our wrapper, just so it can be independently marked + # by pytest without affecting the parent class + @functools.wraps(attr) + def wrapper(self, name, *a, **k): + # This is a hacky super() replacement + return getattr(parents[0], name)(self, *a, **k) + + # Make this an override in the child class + dct[attrname] = functools.partialmethod(wrapper, attrname) + return super(TestAdapterMeta, cls).__new__(cls, name, parents, dct) @@ -73,6 +97,10 @@ def _load_tests(loader, tests, pattern, suite=None): test_features.TestCaseFeatures, test_copy_all.TestCaseCopyAll) + # Load our list of dynamic XFAIL tests + with open('tests/driver_xfails.yaml') as xflist: + xfail_list = yaml.load(xflist, Loader=yaml.SafeLoader) + for image, test in tests.items(): rclass = directory.get_radio(test) if hasattr(rclass, '_orig_rclass'): @@ -83,16 +111,27 @@ def _load_tests(loader, tests, pattern, suite=None): for index, device in enumerate(subdevs): if not isinstance(device, type): device = device.__class__ + rclassid = directory.radio_class_id(device) + xfails = xfail_list.get(rclassid, []) for case in driver_test_cases: tc = TestAdapterMeta( - "%s_%s" % (case.__name__, - directory.radio_class_id(device)), + "%s_%s" % (case.__name__, rclassid), (case,), {'RADIO_CLASS': rclass, 'SUB_DEVICE': index if has_subdevs else None, 'TEST_IMAGE': image}) + # Mark the class with the driver module name tc = getattr(pytest.mark, module)(tc) + + # Look for any XFAILs and mark those test functions + for xfail in xfails: + if xfail['class'] == case.__name__: + # This is like decorating it. + setattr(tc, xfail['test'], + pytest.mark.xfail(reason=xfail['reason'])( + getattr(tc, xfail['test']))) + suite.addTests(loader.loadTestsFromTestCase(tc)) return suite diff --git a/tests/__pycache__/__init__.cpython-310.pyc b/tests/__pycache__/__init__.cpython-310.pyc index e42885a..e5edb17 100644 Binary files a/tests/__pycache__/__init__.cpython-310.pyc and b/tests/__pycache__/__init__.cpython-310.pyc differ diff --git a/tests/__pycache__/base.cpython-310.pyc b/tests/__pycache__/base.cpython-310.pyc index e20be95..0d22964 100644 Binary files a/tests/__pycache__/base.cpython-310.pyc and b/tests/__pycache__/base.cpython-310.pyc differ diff --git a/tests/__pycache__/test_brute_force.cpython-310-pytest-7.1.3.pyc b/tests/__pycache__/test_brute_force.cpython-310-pytest-7.1.3.pyc index 5691216..7cd6a5e 100644 Binary files a/tests/__pycache__/test_brute_force.cpython-310-pytest-7.1.3.pyc and b/tests/__pycache__/test_brute_force.cpython-310-pytest-7.1.3.pyc differ diff --git a/tests/__pycache__/test_edges.cpython-310-pytest-7.1.3.pyc b/tests/__pycache__/test_edges.cpython-310-pytest-7.1.3.pyc index f6922f0..47421f6 100644 Binary files a/tests/__pycache__/test_edges.cpython-310-pytest-7.1.3.pyc and b/tests/__pycache__/test_edges.cpython-310-pytest-7.1.3.pyc differ diff --git a/tests/__pycache__/test_settings.cpython-310-pytest-7.1.3.pyc b/tests/__pycache__/test_settings.cpython-310-pytest-7.1.3.pyc index fc0c17c..5ce354a 100644 Binary files a/tests/__pycache__/test_settings.cpython-310-pytest-7.1.3.pyc and b/tests/__pycache__/test_settings.cpython-310-pytest-7.1.3.pyc differ diff --git a/tests/base.py b/tests/base.py index c2033aa..af29310 100644 --- a/tests/base.py +++ b/tests/base.py @@ -214,11 +214,12 @@ class DriverTest(unittest.TestCase): 'Memories have different mem.extra keys') -def requires_feature(flag): +def requires_feature(flag, equal=None): def inner(fn): @functools.wraps(fn) def wraps(self, *a, **k): - if getattr(self.rf, flag): + val = getattr(self.rf, flag) + if (val == equal if equal is not None else val): fn(self, *a, **k) else: self.skipTest('Feature %s not supported' % flag) diff --git a/tests/driver_xfails.yaml b/tests/driver_xfails.yaml new file mode 100644 index 0000000..6064656 --- /dev/null +++ b/tests/driver_xfails.yaml @@ -0,0 +1,107 @@ +Anysecu_UV-A37: + - class: TestCaseBruteForce + test: test_validate_all + reason: Broken name stored in memory 202? +Talkpod_A36plus: + - class: TestCaseBruteForce + test: test_validate_all + reason: Broken name stored in memory 202? + - class: TestCaseBruteForce + test: test_validate_all_steps + reason: Bad channel stored in image or code is wrong +BTECH_GMRS-20V2: + - class: TestCaseBruteForce + test: test_validate_all + reason: Improper application of the duplex policy +BTECH_GMRS-V2: + - class: TestCaseBruteForce + test: test_validate_all + reason: Improper application of the duplex policy +BTECH_GMRS-50X1: + - class: TestCaseBruteForce + test: test_validate_all + reason: Improper application of the duplex policy +BTECH_GMRS-50V2: + - class: TestCaseBruteForce + test: test_validate_all + reason: Improper application of the duplex policy +BTECH_MURS-V2: + - class: TestCaseBruteForce + test: test_validate_all + reason: Improper application of the duplex policy +Abbree_AR-730: + - class: TestCaseBruteForce + test: test_validate_all + reason: Broken name stored in memory 256? +Radtel_RT-730: + - class: TestCaseBruteForce + test: test_validate_all + reason: Improper application of the duplex policy +Retevis_RB17P: + - class: TestCaseBruteForce + test: test_validate_all + reason: Improper application of the duplex policy +TIDRADIO_TD-H3: + - class: TestCaseBruteForce + test: test_validate_all + reason: Memory 3 stored with TX outside TX range +TIDRADIO_TD-H8: + - class: TestCaseBruteForce + test: test_validate_all + reason: Memory 6 stored with TX outside TX range +TIDRADIO_TD-H8-GMRS: + - class: TestCaseBruteForce + test: test_validate_all + reason: Memory 31 stored with TX outside gmrs bands +TIDRADIO_TD-H8-HAM: + - class: TestCaseBruteForce + test: test_validate_all + reason: Memory 31 stored with TX outside ham bands +Yaesu_FT-90: + - class: TestCaseBruteForce + test: test_validate_all + reason: Memory 7 stored with high power but unable to be set? +Wouxun_KG-UVD1P: + - class: TestCaseBruteForce + test: test_validate_all_steps + reason: Bad channel stored in image or code is wrong +Puxing_PX-2R: + - class: TestCaseBruteForce + test: test_validate_all_steps + reason: Bad channel stored in image or code is wrong +Radtel_RT-470X_BT: + - class: TestCaseBruteForce + test: test_validate_all_steps + reason: Bad channel stored in image or code is wrong +BTECH_UV-25X4_G2: + - class: TestCaseBruteForce + test: test_validate_all_steps + reason: Bad channel stored in image or code is wrong +Abbree_AR-63: + - class: TestCaseBruteForce + test: test_validate_all_steps + reason: Bad channel stored in image or code is wrong +Feidaxin_FD-288B: + - class: TestCaseBruteForce + test: test_validate_all_steps + reason: Bad channel stored in image or code is wrong +Wouxun_KG-UV8E: + - class: TestCaseBruteForce + test: test_validate_all_steps + reason: Bad channel stored in image or code is wrong +Boblov_X3Plus: + - class: TestCaseBruteForce + test: test_validate_all_steps + reason: Bad channel stored in image or code is wrong +QYT_KT7900D: + - class: TestCaseBruteForce + test: test_validate_all_steps + reason: Bad channel stored in image or code is wrong +BTECH_UV-25X4: + - class: TestCaseBruteForce + test: test_validate_all_steps + reason: Bad channel stored in image or code is wrong +Baojie_BJ-9900_Left: + - class: TestCaseBruteForce + test: test_validate_all_steps + reason: Bad channel stored in image or code is wrong diff --git a/tests/images/Baofeng_UV-5R.img b/tests/images/Baofeng_UV-5R.img index dcdc3e8..773c32b 100644 Binary files a/tests/images/Baofeng_UV-5R.img and b/tests/images/Baofeng_UV-5R.img differ diff --git a/tests/images/Icom_IC-F621-2.img b/tests/images/Icom_IC-F621-2.img new file mode 100644 index 0000000..fe86e99 Binary files /dev/null and b/tests/images/Icom_IC-F621-2.img differ diff --git a/tests/images/Kenwood_TK-280.img b/tests/images/Kenwood_TK-280.img new file mode 100644 index 0000000..f6bc6c1 Binary files /dev/null and b/tests/images/Kenwood_TK-280.img differ diff --git a/tests/images/Kenwood_TK-481.img b/tests/images/Kenwood_TK-481.img new file mode 100644 index 0000000..26e8eb5 Binary files /dev/null and b/tests/images/Kenwood_TK-481.img differ diff --git a/tests/images/Kenwood_TK-880.img b/tests/images/Kenwood_TK-880.img new file mode 100644 index 0000000..3b38b43 Binary files /dev/null and b/tests/images/Kenwood_TK-880.img differ diff --git a/tests/images/Kenwood_TK-981.img b/tests/images/Kenwood_TK-981.img new file mode 100755 index 0000000..cb613fb Binary files /dev/null and b/tests/images/Kenwood_TK-981.img differ diff --git a/tests/images/Radioddity_GA-510_V2.img b/tests/images/Radioddity_GA-510_V2.img index 7695033..2c338a2 100644 Binary files a/tests/images/Radioddity_GA-510_V2.img and b/tests/images/Radioddity_GA-510_V2.img differ diff --git a/tests/images/Retevis_H777H_FRS.img b/tests/images/Retevis_H777H_FRS.img new file mode 100644 index 0000000..70a036a Binary files /dev/null and b/tests/images/Retevis_H777H_FRS.img differ diff --git a/tests/images/Retevis_RB626.img b/tests/images/Retevis_RB626.img new file mode 100644 index 0000000..c4cb38a Binary files /dev/null and b/tests/images/Retevis_RB626.img differ diff --git a/tests/images/Yaesu_VX-7.img b/tests/images/Yaesu_VX-7.img index 2542f8e..8a95099 100644 Binary files a/tests/images/Yaesu_VX-7.img and b/tests/images/Yaesu_VX-7.img differ diff --git a/tests/py3-untested-drivers.txt b/tests/py3-untested-drivers.txt index ac576c8..ae81485 100644 --- a/tests/py3-untested-drivers.txt +++ b/tests/py3-untested-drivers.txt @@ -35,7 +35,6 @@ Kenwood_TS-590S_SG_LiveMode Kenwood_TS-850 Puxing_PX-2R RT_Systems_CSV -Rugged_RH5R-V2 Sainsonic_AP510 TYT_TH-350 TYT_TH-7800_File diff --git a/tests/py3_driver_testers.txt b/tests/py3_driver_testers.txt index a0aaa55..2925741 100644 --- a/tests/py3_driver_testers.txt +++ b/tests/py3_driver_testers.txt @@ -253,6 +253,8 @@ Radtel_RT-495,@KC9HI,14-Jun-2024 Radtel_RT-630,@KC9HI,14-Jun-2024 Radtel_RT-730,@KC9HI,11-May-2024 Radtel_T18,@KC9HI,28-Nov-2022 +Retevis_H777H_FRS,@KC9HI,12-Jan-2025 +Retevis_H777H_PMR,@KC9HI,12-Jan-2025 Retevis_H777S,@KC9HI,22-Dec-2022 Retevis_H777_Plus,@KC9HI,4-Dec-2022 Retevis_P2,@KC9HI,15-Jun-2024 diff --git a/tests/test_brute_force.py b/tests/test_brute_force.py index eb5ea9b..f3bd68f 100644 --- a/tests/test_brute_force.py +++ b/tests/test_brute_force.py @@ -1,5 +1,7 @@ import logging +import pytest + from chirp import chirp_common from chirp import errors from tests import base @@ -190,3 +192,32 @@ class TestCaseBruteForce(base.DriverTest): # in some radios self.set_and_compare(tmp, ignore=['tuning_step']) successes += 1 + + def test_validate_all(self): + lo, hi = self.rf.memory_bounds + for i in range(lo, hi + 1): + m1 = self.radio.get_memory(i) + errs, warns = chirp_common.split_validation_msgs( + self.radio.validate_memory(m1)) + self.assertEqual([], errs, + ('Radio has validation errors for memory %i ' + 'stored in sample image') % i) + + @base.requires_feature('has_nostep_tuning', equal=False) + def test_validate_all_steps(self): + lo, hi = self.rf.memory_bounds + for i in range(lo, hi + 1): + m1 = self.radio.get_memory(i) + try: + chirp_common.required_step(m1.freq, self.rf.valid_tuning_steps) + except Exception as e: + self.fail('Memory %i: %s' % (i, e)) + + @pytest.mark.skip(reason='not ready yet') + def test_get_set_all(self): + lo, hi = self.rf.memory_bounds + for i in range(lo, hi + 1): + m1 = self.radio.get_memory(i) + self.radio.set_memory(m1) + m2 = self.radio.get_memory(i) + self.assertEqualMem(m1, m2) diff --git a/tests/test_edges.py b/tests/test_edges.py index b3391c4..c5c0775 100644 --- a/tests/test_edges.py +++ b/tests/test_edges.py @@ -107,6 +107,22 @@ class TestCaseEdges(base.DriverTest): 'to delete location %i' % loc) break + def test_redelete_memory(self): + m = self.get_mem() + if 'empty' in m.immutable: + self.skipTest('Test memory is not deletable') + + # Delete this memory + m.empty = True + self.radio.set_memory(m) + + # Try to delete it again + self.radio.set_memory(m) + + # Make sure it appears deleted + m2 = self.radio.get_memory(m.number) + self.assertTrue(m2.empty) + def test_get_set_specials(self): if not self.rf.valid_special_chans: self.skipTest('Radio has no specials') diff --git a/tests/test_settings.py b/tests/test_settings.py index 45267f0..2bcd302 100644 --- a/tests/test_settings.py +++ b/tests/test_settings.py @@ -35,6 +35,9 @@ class TestCaseSettings(base.DriverTest): self.assertEqual(a.get_value(), b.get_value(), 'Setting value changed from %r to %r' % ( a.get_value(), b.get_value())) + except Exception as e: + print('Failed %s on %s' % (e, a.get_name())) + raise def test_memory_extra_frozen(self): # Find the first non-empty memory and try to set it back as a diff --git a/tests/unit/__pycache__/test_bitwise.cpython-310-pytest-7.1.3.pyc b/tests/unit/__pycache__/test_bitwise.cpython-310-pytest-7.1.3.pyc index 9dcc2db..b65e7cd 100644 Binary files a/tests/unit/__pycache__/test_bitwise.cpython-310-pytest-7.1.3.pyc and b/tests/unit/__pycache__/test_bitwise.cpython-310-pytest-7.1.3.pyc differ diff --git a/tests/unit/__pycache__/test_repeaterbook.cpython-310-pytest-7.1.3.pyc b/tests/unit/__pycache__/test_repeaterbook.cpython-310-pytest-7.1.3.pyc index 9676932..9c51168 100644 Binary files a/tests/unit/__pycache__/test_repeaterbook.cpython-310-pytest-7.1.3.pyc and b/tests/unit/__pycache__/test_repeaterbook.cpython-310-pytest-7.1.3.pyc differ diff --git a/tests/unit/test_bitwise.py b/tests/unit/test_bitwise.py index 4ba467f..dc38cb6 100644 --- a/tests/unit/test_bitwise.py +++ b/tests/unit/test_bitwise.py @@ -97,6 +97,21 @@ class TestBitwiseBaseIntTypes(BaseTest): obj.foo[i] = i * 2 self.assertEqual(b'\x00\x02\x04\x06', data.get_packed()) + def test_int_array_of_one(self): + data = memmap.MemoryMapBytes(bytes(b'\x00\x01\x02\x03')) + obj = bitwise.parse('u8 foo[1];', data) + self.assertEqual(0, obj.foo[0]) + obj.foo[0] = 1 + self.assertEqual(b'\x01\x01\x02\x03', data.get_packed()) + + def test_int_array_of_zero(self): + data = memmap.MemoryMapBytes(bytes(b'\x00\x01\x02\x03')) + obj = bitwise.parse('u8 foo[0x0]; u8 bar;', data) + # Make sure we can't access any elements of zero-length foo + self.assertRaises(IndexError, lambda: obj.foo[0]) + # Make sure bar is still at the front, unaffected by zero-length foo + self.assertEqual(0, obj.bar) + def test_int_array_set_raw(self): data = memmap.MemoryMapBytes(bytes(b'\x00\x01\x02\x03')) obj = bitwise.parse('u8 foo[4];', data) @@ -357,6 +372,12 @@ class TestBitwiseStructTypes(BaseTest): self.assertRaises(AssertionError, obj.fill_raw, b'AB') self.assertRaises(AssertionError, obj.fill_raw, False) + def test_struct_array_of_one(self): + data = memmap.MemoryMapBytes(bytes(b"123")) + defn = "struct { u8 bar; } foo[1];" + obj = bitwise.parse(defn, data) + self.assertEqual(ord('1'), obj.foo[0].bar) + class TestBitwisePrintoffset(BaseTest): @mock.patch.object(bitwise.LOG, 'debug') @@ -383,6 +404,17 @@ class TestBitwiseErrors(BaseTest): def test_missing_semicolon(self): self.assertRaises(SyntaxError, bitwise.parse, "u8 foo", "") + def test_missing_element(self): + obj = bitwise.parse('u8 foo; struct { u8 bar; } baz;', b'12') + self.assertRaisesRegex(AttributeError, + 'No attribute does_not_exist', + getattr, obj, 'does_not_exist') + self.assertRaisesRegex(AttributeError, + 'No attribute this_either', + getattr, obj.baz, 'this_either') + self.assertTrue('foo' in obj) + self.assertFalse('does_not_exist' in obj) + class TestBitwiseComments(BaseTest): def test_comment_inline_cppstyle(self): diff --git a/tests/unit/test_chirp_common.py b/tests/unit/test_chirp_common.py index ea3bcf8..facdbed 100644 --- a/tests/unit/test_chirp_common.py +++ b/tests/unit/test_chirp_common.py @@ -78,6 +78,11 @@ class TestUtilityFunctions(base.BaseTest): self.assertEqual(140, chirp_common.from_MHz(14000001)) self.assertEqual(140, chirp_common.from_kHz(14001)) + def test_mem_to_from_csv(self): + mem1 = chirp_common.Memory() + mem2 = chirp_common.Memory._from_csv(','.join(mem1.to_csv())) + self.assertEqual(str(mem1), str(mem2)) + def test_mem_from_text_rb1(self): text = '145.2500 -0.6 MHz 97.4 OPEN' mem = chirp_common.mem_from_text(text) @@ -227,6 +232,24 @@ class TestUtilityFunctions(base.BaseTest): self.assertEqual(150000000, mem.offset) self.assertEqual('split', mem.duplex) + def test_mem_from_text_tsv(self): + from_lo = """8 Mt Scott 147.28 + 0.6 TSQL 88.5 167.9 23 NN 23 Tone->Tone FM 5 50W TayDan Emergency Step #2 +9 Mt Tabor 145.39 - 0.6 TSQL 88.5 100 23 NN 23 Tone->Tone FM 5 50W TayDan Emergency Step #1 +10 Timberline V 147.12 + 0.6 TSQL 103.5 100 23 NN 23 Tone->Tone FM 5 50W TayDan Emergency Step #4 +11 Timberline U 444.225 + 5 TSQL 88.5 100 23 NN 23 Tone->Tone FM 5 50W K7RPT Timberline, Linked to VHF side, AC7QE-R echolink +12 GovtCamp 443.875 + 5 TSQL 88.5 103.5 23 NN 23 Tone->Tone FM 5 50W""" # noqa + + lines = from_lo.split('\n') + mem = chirp_common.mem_from_text(lines[0]) + self.assertEqual('Mt Scott', mem.name) + self.assertEqual('TSQL', mem.tmode) + self.assertEqual('+', mem.duplex) + self.assertEqual(600000, mem.offset) + self.assertEqual(147280000, mem.freq) + self.assertEqual(8, mem.number) + for line in from_lo.split('\n'): + chirp_common.mem_from_text(line) + def test_mem_to_text1(self): mem = chirp_common.Memory() mem.freq = 146900000 diff --git a/tests/unit/test_repeaterbook.py b/tests/unit/test_repeaterbook.py index 8a0b059..57532fa 100644 --- a/tests/unit/test_repeaterbook.py +++ b/tests/unit/test_repeaterbook.py @@ -43,6 +43,7 @@ class TestRepeaterbook(unittest.TestCase): 'lon': coords[1], 'dist': 100, 'openonly': False, + 'cached': False, }) m = rb.get_memory(0) self.assertIsInstance(m, chirp_common.Memory) @@ -81,6 +82,7 @@ class TestRepeaterbook(unittest.TestCase): 'dist': 100, 'service': 'gmrs', 'openonly': False, + 'cached': False, }) m = rb.get_memory(0) self.assertIsInstance(m, chirp_common.Memory) @@ -102,6 +104,7 @@ class TestRepeaterbook(unittest.TestCase): 'lon': 133, 'dist': 20000, 'openonly': False, + 'cached': False, }) m = rb.get_memory(0) self.assertIsInstance(m, chirp_common.Memory) @@ -122,6 +125,7 @@ class TestRepeaterbook(unittest.TestCase): 'lon': -122, 'dist': 0, 'openonly': False, + 'cached': False, 'filter': 'tower'} rb = self._test_with_mocked(params) self.assertGreater(sum(rb.get_features().memory_bounds), 5) @@ -133,6 +137,7 @@ class TestRepeaterbook(unittest.TestCase): 'lon': -122, 'dist': 0, 'openonly': False, + 'cached': False, 'filter': 'tower'} rb1 = self._test_with_mocked(dict(params)) self.assertGreater(sum(rb1.get_features().memory_bounds), 5) -- cgit v1.2.3