def setUp(self, props=None): set_up() self.wolf = create_wolf(TEST_WNAME, TEST_WNUM) self.sheep = create_sheep(TEST_SNAME, TEST_SNUM) self.wolves = get_group(WOLF_GROUP) self.wolves += self.wolf # make a new plural for sheep! self.sheeps = get_group(SHEEP_GROUP) self.sheeps += self.sheep get_env().place_member(self.sheep, None) get_env().place_member(self.wolf, None)
def test_create_sheep(self): """ Test to see if sheep is created """ new_sheep = create_sheep(1) self.assertEqual(new_sheep.name, AGT_SHEEP_NAME + str(1))
def setUp(self): (ws.wolves, ws.sheep, ws.meadow) = set_up() self.wolf = create_wolf(TEST_WNUM) self.sheep = create_sheep(TEST_SNUM)
def test_create_sheep(self): new_sheep = create_sheep(1) self.assertEqual(new_sheep.name, AGT_SHEEP_NAME + str(1))
def setUp(self): self.pa = PropArgs.create_props('wolfsheep_props', ds_file='props/wolfsheep.props.json') (ws.wolves, ws.sheep, ws.meadow) = set_up() self.wolf = create_wolf(TEST_WNUM, self.pa) self.sheep = create_sheep(TEST_SNUM, self.pa)