Skip to content

Commit

Permalink
Fix test_dtcs and test_cross skipping
Browse files Browse the repository at this point in the history
This test has been wrong for a long time, basically never properly
asserting DTCS values for drivers. The three drivers fixed immediately
before this commit should have been caught by this test, but were not
because it was always skipping the dtcs field.

Related to #11506
  • Loading branch information
kk7ds committed Aug 31, 2024
1 parent e5a18ea commit 14c33f1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,16 @@ def assertEqualMem(self, a, b, ignore=None):
(a.tmode == "Cross" and
rx_mode == "Tone"))):
continue
elif k == "dtcs" and not (
(a.tmode == "DTCS" and not self.rf.has_rx_dtcs) or
(a.tmode == "Cross" and tx_mode == "DTCS") or
(a.tmode == "Cross" and rx_mode == "DTCS" and
not self.rf.has_rx_dtcs)):
elif k == "dtcs" and (a.tmode != 'DTCS' or
(a.tmode == 'Cross' and tx_mode != 'DTCS')):
# If we are not in a tmode where a transmit DTCS code is
# required, we do not care if the code is persisted.
continue
elif k == "rx_dtcs" and (not self.rf.has_rx_dtcs or
not (a.tmode == "Cross" and
rx_mode == "DTCS")):
# If we are not in a tmode where a receive DTCS code is
# required, we do not care if the code is persisted.
continue
elif k == "offset" and not a.duplex:
continue
Expand Down

0 comments on commit 14c33f1

Please sign in to comment.