diff options
| author | Dave Hibberd <hibby@debian.org> | 2025-09-25 21:58:50 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2025-09-25 21:58:50 +0100 |
| commit | dff1a610625ebe7841fca01e20ca6d86b65ee4d0 (patch) | |
| tree | 97c0482e33cbbd110ac648db8a32ea8e09638134 /tests/unit/test_chirp_common.py | |
| parent | f6b2e6e7159906b8b3204dca3a9e58e42c36ccbb (diff) | |
New upstream version 20250912upstream/20250912
Diffstat (limited to 'tests/unit/test_chirp_common.py')
| -rw-r--r-- | tests/unit/test_chirp_common.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/unit/test_chirp_common.py b/tests/unit/test_chirp_common.py index facdbed..0edce51 100644 --- a/tests/unit/test_chirp_common.py +++ b/tests/unit/test_chirp_common.py @@ -504,7 +504,7 @@ class TestStepFunctions(base.BaseTest): 6.25: self._625, 12.5: self._125, } - allowed = [6.25, 12.5] + allowed = [12.5, 6.25] for step, freqs in list(steps.items()): for freq in freqs: # We don't support 5.0, so any of the frequencies in that @@ -520,7 +520,7 @@ class TestStepFunctions(base.BaseTest): def test_required_step_finds_suitable(self): # If we support 5.0, we should get it as the step for those self.assertEqual(5.0, chirp_common.required_step(self._005[0], - allowed=[2.5, 5.0])) + allowed=[5.0, 2.5])) # If we support 2.5 and not 5.0, then we should find 2.5 as a suitable # alternative self.assertEqual(2.5, chirp_common.required_step(self._005[0], @@ -534,7 +534,7 @@ class TestStepFunctions(base.BaseTest): def test_required_step_fail(self): self.assertRaises(errors.InvalidDataError, chirp_common.required_step, - 146520500) + 146520500, allowed=[5.0, 10.0, 12.5]) def test_fix_rounded_step_250(self): self.assertEqual(146106250, @@ -548,6 +548,10 @@ class TestStepFunctions(base.BaseTest): self.assertEqual(146118750, chirp_common.fix_rounded_step(146118000)) + def test_fix_rounded_step_no_change(self): + self.assertEqual(146520000, + chirp_common.fix_rounded_step(146520000)) + class TestImageMetadata(base.BaseTest): def test_make_metadata(self): |
