<commit_before>#!/usr/bin/env python
from swig_test_utils import *
import pythonize
from serializers.xmlanimation import XMLAnimationLoader

class ActionTests(unittest.TestCase):
	def setUp(self):
		template = 'tests/data/wolf_walk/wolf_walk_%s.xml'
		dirnames = ['e', 'ne', 'n', 'nw', 'w', 'sw', 's', 'se']
		files = map(lambda dirname: template % dirname, dirnames)

		self.engine = getEngine()
		pool = self.engine.getAnimationPool()
		self.animationloader = XMLAnimationLoader(self.engine.getImagePool(), self.engine.getVFS())
		pool.addResourceLoader(self.animationloader)
		
		_map = self.engine.getModel().createMap("map001")
		
		self.grid = fife.SquareGrid(True)
		self.layer = _map.createLayer("Layer001", self.grid)
		
		self.target = fife.Location(self.layer)
	
		self.obj = fife.Object("object001", 'plaa')
		fife.ObjectVisual.create(self.obj)
		self.pather = fife.LinearPather()
		self.obj.setPather(self.pather)
		self.action = self.obj.createAction('walk')
		fife.ActionVisual.create(self.action)
		addResource = self.engine.animationPool.addResourceFromFile
		for index, direction in enumerate(dirnames):
			degree = 45 * index
			self.action.get2dGfxVisual().addAnimation(degree, addResource(files[index]))

		self.ground = fife.Object("ground", 'plaa')
		imgid = self.engine.imagePool.addResourceFromFile('tests/data/earth_1.png')
		fife.ObjectVisual.create(self.ground)
		self.ground.get2dGfxVisual().addStaticImage(0, imgid)		
		self.ground.img = self.engine.getImagePool().getImage(imgid)
		for y in xrange(-2,3):
			for x in xrange(-2,3):
				inst = self.layer.createInstance(self.ground, fife.ModelCoordinate(x,y))
				fife.InstanceVisual.create(inst)<commit_msg>fixed the test due to removing linearpather<commit_after>#!/usr/bin/env python
from swig_test_utils import *
import pythonize
from serializers.xmlanimation import XMLAnimationLoader

class ActionTests(unittest.TestCase):
	def setUp(self):
		template = 'tests/data/wolf_walk/wolf_walk_%s.xml'
		dirnames = ['e', 'ne', 'n', 'nw', 'w', 'sw', 's', 'se']
		files = map(lambda dirname: template % dirname, dirnames)

		self.engine = getEngine()
		pool = self.engine.getAnimationPool()
		self.animationloader = XMLAnimationLoader(self.engine.getImagePool(), self.engine.getVFS())
		pool.addResourceLoader(self.animationloader)
		
		_map = self.engine.getModel().createMap("map001")
		
		self.grid = fife.SquareGrid(True)
		self.layer = _map.createLayer("Layer001", self.grid)
		
		self.target = fife.Location(self.layer)
	
		self.obj = fife.Object("object001", 'plaa')
		fife.ObjectVisual.create(self.obj)
#		self.pather = fife.LinearPather()
                self.pather = fife.RoutePather()
		self.obj.setPather(self.pather)
		self.action = self.obj.createAction('walk')
		fife.ActionVisual.create(self.action)
		addResource = self.engine.animationPool.addResourceFromFile
		for index, direction in enumerate(dirnames):
			degree = 45 * index
			self.action.get2dGfxVisual().addAnimation(degree, addResource(files[index]))

		self.ground = fife.Object("ground", 'plaa')
		imgid = self.engine.imagePool.addResourceFromFile('tests/data/earth_1.png')
		fife.ObjectVisual.create(self.ground)
		self.ground.get2dGfxVisual().addStaticImage(0, imgid)		
		self.ground.img = self.engine.getImagePool().getImage(imgid)
		for y in xrange(-2,3):
			for x in xrange(-2,3):
				inst = self.layer.createInstance(self.ground, fife.ModelCoordinate(x,y))
				fife.InstanceVisual.create(inst)
{'fraction_non_alphanumeric': 0.14186450492182975, 'fraction_numerical': 0.011001737116386797, 'mean_word_length': 4.936426116838488, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3724512', 'n_tokens_mistral': 1299, 'n_tokens_neox': 1169, 'n_words': 193}