def test_flag_invalid(self): test = tile() test.uncover() test.place_flag() self.assertEqual(False, test.flag)
def test_uncover_flag(self): test = tile() test.place_flag() test.uncover() self.assertEqual(False, test.covered) self.assertEqual(False, test.flag)
def test_constructor_all(self): test = tile(mine=True, adjacent=8) self.assertEqual(True, test.mine) self.assertEqual(False, test.flag) self.assertEqual(8, test.adjacent) self.assertEqual(True, test.covered)
def test_flag_valid(self): test = tile() test.place_flag() self.assertEqual(True, test.flag)
def test_constructor_default(self): test = tile() self.assertEqual(False, test.mine) self.assertEqual(False, test.flag) self.assertEqual(0, test.adjacent) self.assertEqual(True, test.covered)
def test_rep_mine(self): test = tile(mine=True) test.uncover() self.assertEqual(tile_rep.BOOM, test.rep)
def test_rep_adjacent(self): test = tile(adjacent=2) test.uncover() self.assertEqual(tile_rep.TWO, test.rep)
def test_rep_flag(self): test = tile() test.place_flag() self.assertEqual(tile_rep.FLAG, test.rep)
def test_rep_covered(self): test = tile() self.assertEqual(tile_rep.COVERED, test.rep)