[chirp_devel] [PATCH 1 of 2] [tests] Check that can_odd_split is defined when 'split' is a supported duplex. #505
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1360121495 28800 # Node ID e30cb8fd7d1c6700b5044da64baf94326262641e # Parent fc9e4f7b0f013b7077429c342f1d7f49dd8737d7 [tests] Check that can_odd_split is defined when 'split' is a supported duplex. #505
diff -r fc9e4f7b0f01 -r e30cb8fd7d1c tests/run_tests --- a/tests/run_tests Tue Feb 05 18:41:22 2013 -0800 +++ b/tests/run_tests Tue Feb 05 19:31:35 2013 -0800 @@ -353,8 +353,14 @@ for duplex in rf.valid_duplexes: if duplex not in ["", "-", "+", "split"]: continue + if duplex == "split" and not rf.can_odd_split: + raise TestFailedError("Forgot to set rf.can_odd_split!") m.duplex = duplex self.set_and_compare(m) + + if rf.can_odd_split and "split" not in rf.valid_duplexes: + raise TestFailedError("Paste error: rf.can_odd_split defined, but " + "split duplex not supported.")
def do_skip(self, m, rf): for skip in rf.valid_skips:
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1360121728 28800 # Node ID e7598732815346e5b2fb7ba14db08c69aa81e989 # Parent e30cb8fd7d1c6700b5044da64baf94326262641e Add rf.can_odd_split to models that support 'split' duplex. #505
diff -r e30cb8fd7d1c -r e75987328153 chirp/ft1802.py --- a/chirp/ft1802.py Tue Feb 05 19:31:35 2013 -0800 +++ b/chirp/ft1802.py Tue Feb 05 19:35:28 2013 -0800 @@ -93,6 +93,7 @@
rf.memory_bounds = (0, 199)
+ rf.can_odd_split = True rf.has_ctone = False rf.has_tuning_step = True rf.has_dtcs_polarity = False # in radio settings, not per memory diff -r e30cb8fd7d1c -r e75987328153 chirp/ft60.py --- a/chirp/ft60.py Tue Feb 05 19:31:35 2013 -0800 +++ b/chirp/ft60.py Tue Feb 05 19:35:28 2013 -0800 @@ -178,6 +178,7 @@ rf.valid_name_length = 6 rf.valid_modes = ["FM", "NFM", "AM"] rf.valid_bands = [(108000000, 520000000), (700000000, 999990000)] + rf.can_odd_split = True rf.has_ctone = False rf.has_bank = False rf.has_dtcs_polarity = False diff -r e30cb8fd7d1c -r e75987328153 chirp/vx5.py --- a/chirp/vx5.py Tue Feb 05 19:31:35 2013 -0800 +++ b/chirp/vx5.py Tue Feb 05 19:35:28 2013 -0800 @@ -167,6 +167,7 @@
def get_features(self): rf = chirp_common.RadioFeatures() + rf.can_odd_split = True rf.has_bank = True rf.has_ctone = False rf.has_dtcs_polarity = False
participants (1)
-
Tom Hayward