コード例 #1
0
 def test_can_get_cell_at_location(self):
     world = World()
     world.set_living_at(self.location)
     self.assertIsInstance(world.get_cell_at(self.location), Cell)
コード例 #2
0
 def test_get_cell_at_location_without_cell_returns_dead_cell(self):
     world = World()
     self.assertIsInstance(world.get_cell_at(self.location), Cell)
     self.assertFalse(world.get_cell_at(self.location).is_alive)
コード例 #3
0
 def test_cell_can_be_set_dead_and_retrieved_if_never_set_living(self):
     world = World()
     world.set_dead_at(self.location)
     self.assertIsInstance(world.get_cell_at(self.location), Cell)