def test_W_03(self): txt_rule = "L1>0\n" \ "L1<10\n" \ "L2>0\n" \ "L2<10\n" \ "W==90".splitlines() rules = Rule.parse(txt_rule) Equation.validate_rules_for_w(rules)
def test_W_01(self): txt_rule = "L1>0\n" \ "L1<10\n" \ "L2>0\n" \ "L2<10\n" \ "W<=90".splitlines() rules = Rule.parse(txt_rule) exceptions = (RuleException) with self.assertRaises(exceptions): Equation.validate_rules_for_w(rules)