def test_str(self): world = World(0, 0) alive = Cell(0, 0) alive.live() dead = Cell(0, 1) world.cells = [[alive, dead], [dead, alive]] self.assertEqual(str(world), u'\u25A0 \u25A1 \n\u25A1 \u25A0 \n')
def test_str(self): cell = Cell(0, 0) cell.live() self.assertEqual(u'\u25A0', str(cell)) cell.die() self.assertEqual(u'\u25A1', str(cell))
def test_live_cells(self): cell = Cell(0, 0) cell.live() self.assertTrue(cell.alive)