示例#1
0
 def test_it_exists(self):
     cell = Cell("B4")
     self.assertEqual(cell.coordinate, "B4")
     self.assertEqual(cell.ship, None)
     self.assertEqual(cell.isEmpty(), True)
示例#2
0
 def test_place_ship(self):
     cell = Cell("B4")
     cruiser = Ship("Cruiser", 3)
     cell.place_ship(cruiser)
     self.assertEqual(cell.ship, cruiser)
     self.assertEqual(cell.isEmpty(), False)