예제 #1
0
	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)
예제 #2
0
	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)
예제 #3
0
	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)
예제 #4
0
	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)
예제 #5
0
	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)