# 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: