[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 1360122146 28800 # Node ID 4b43aa33b24c96b473341251068572aef0cc08ee # Parent fc9e4f7b0f013b7077429c342f1d7f49dd8737d7 [tests] Check that can_odd_split is defined when 'split' is a supported duplex. #505
diff -r fc9e4f7b0f01 -r 4b43aa33b24c tests/run_tests --- a/tests/run_tests Tue Feb 05 18:41:22 2013 -0800 +++ b/tests/run_tests Tue Feb 05 19:42:26 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 1360122147 28800 # Node ID 9fea9e34a71ba4b63a3d89e79a072e98d21539f5 # Parent 4b43aa33b24c96b473341251068572aef0cc08ee Add rf.can_odd_split to models that support 'split' duplex. #505
diff -r 4b43aa33b24c -r 9fea9e34a71b chirp/ft1802.py --- a/chirp/ft1802.py Tue Feb 05 19:42:26 2013 -0800 +++ b/chirp/ft1802.py Tue Feb 05 19:42:27 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 4b43aa33b24c -r 9fea9e34a71b chirp/ft60.py --- a/chirp/ft60.py Tue Feb 05 19:42:26 2013 -0800 +++ b/chirp/ft60.py Tue Feb 05 19:42:27 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 4b43aa33b24c -r 9fea9e34a71b chirp/vx5.py --- a/chirp/vx5.py Tue Feb 05 19:42:26 2013 -0800 +++ b/chirp/vx5.py Tue Feb 05 19:42:27 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