def testThirstyBetweenDrinks(self): startframe = 6 endframe = 19 thirst_changes = xml_stuff.getFluentChangesForFluentBetweenFrames(self.root, 'thirst', startframe, endframe) assert len(thirst_changes) == 1, "found {} changes of thirst between frames {} and {}".format(len(thirst_changes),startframe,endframe)
def testFluentTooEarly(self): door_changes = xml_stuff.getFluentChangesForFluentBetweenFrames(self.causal_xml, 'door', 0, 350) assert len(door_changes)==1, "found {} unexpected changes before frame {}".format(len(door_changes),frame)
def testFluentTooLate(self): frame = 7 light_changes = xml_stuff.getFluentChangesForFluentBetweenFrames(self.root,'light',frame, 15) assert not len(light_changes), "found {} unexpected changes after frame {}".format(len(light_changes),frame)
def testTooManyFluentChanges(self): screen_changes = xml_stuff.getFluentChangesForFluentBetweenFrames(self.root, 'screen', 0, 1000) assert (len(screen_changes) == 1), "found {} unexpected fluent changes".format(len(screen_changes) - 1)
def testFluentTooEarly(self): frame = 5 light_changes = xml_stuff.getFluentChangesForFluentBetweenFrames(self.root,'light',0, frame) assert not len(light_changes), "found {} unexpected changes before frame {}".format(len(light_changes),frame)