[GRASS-SVN] r56294 - grass-addons/grass7/raster/r.agent/tests

svn_grass at osgeo.org svn_grass at osgeo.org
Sat May 18 04:19:00 PDT 2013


Author: mic
Date: 2013-05-18 04:18:59 -0700 (Sat, 18 May 2013)
New Revision: 56294

Modified:
   grass-addons/grass7/raster/r.agent/tests/test_ant.py
   grass-addons/grass7/raster/r.agent/tests/test_world.py
Log:
improve tests

Modified: grass-addons/grass7/raster/r.agent/tests/test_ant.py
===================================================================
--- grass-addons/grass7/raster/r.agent/tests/test_ant.py	2013-05-18 11:18:28 UTC (rev 56293)
+++ grass-addons/grass7/raster/r.agent/tests/test_ant.py	2013-05-18 11:18:59 UTC (rev 56294)
@@ -9,7 +9,7 @@
         self.pg = playground.Playground()
         self.pg.setregion(3,3)
         self.world = anthill.Anthill(self.pg)
-        self.world.sites = [[2,2]]
+        self.world.sites = [[1,1]]
         self.agent = self.world.bear()
 
     def test_setposition(self):

Modified: grass-addons/grass7/raster/r.agent/tests/test_world.py
===================================================================
--- grass-addons/grass7/raster/r.agent/tests/test_world.py	2013-05-18 11:18:28 UTC (rev 56293)
+++ grass-addons/grass7/raster/r.agent/tests/test_world.py	2013-05-18 11:18:59 UTC (rev 56294)
@@ -35,6 +35,7 @@
         self.assertIs(agent, self.world.agents.pop())
         agent = self.world.bear(1)
         self.assertIs(agent, self.world.agents.pop())
+        self.assertEqual(0, len(self.world.agents))
 
     def test_move(self):
         agent = self.world.bear(1, [0,0])



More information about the grass-commit mailing list