def testRunRulesTransition3MinOK(self): ver = Verification("test/transition3OK.IN.xml") tree = ver.run(report = False, bad = True) xsd.assertValid(tree) self.assertEquals(etree.tostring(objectify.fromstring(open("test/transition3OK.OUT.MIN.xml").read()), pretty_print = True), ver.getXML())
def testRunRulesMoleculeCH4MinOK(self): ver = Verification("test/moleculeCH4.IN.xml") #printRules(ver.rules) tree = ver.run(bad = True) xsd.assertValid(tree) #Need test RuleT03 self.assertEquals(etree.tostring(objectify.fromstring(open("test/moleculeCH4.OUT.MIN.xml").read()), pretty_print = True), ver.getXML())
def testRunRulesTransition3MaxOK(self): rulesParser = RulesParser() rulesParser.useRules = {Rule("atomRuleT01", None), Rule("atomRuleT02", None)} ver = Verification("test/transition3OK.IN.xml", rulesParser.getRules()) tree = ver.run(report = True, bad = None) xsd.assertValid(tree) self.assertEquals(etree.tostring(objectify.fromstring(open("test/transition3OK.OUT.MAX.xml").read()), pretty_print = True), ver.getXML())
def testRunRulesMoleculeCO2MinOK(self): #rules = RulesParser().getRules(only={"ltcsRuleS04":{}}) rules = None ver = Verification("test/moleculeCO2.IN.xml", rules = rules) #printRules(ver.rules) tree = ver.run(report = False, bad = True) xsd.assertValid(tree) self.assertEquals(etree.tostring(objectify.fromstring(open("test/moleculeCO2.OUT.MIN.xml").read()), pretty_print = True), ver.getXML())