[chirp_devel] [PATCH 1 of 2] [tests] Check that can_odd_split is defined when 'split' is a supported duplex. #505

Tom Hayward
Tue Feb 5 19:36:28 PST 2013


# HG changeset patch
# User Tom Hayward <tom at 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:



More information about the chirp_devel mailing list