загружаю начало 17 занятия
This commit is contained in:
parent
a0050ef3f0
commit
2ff4eceea1
Binary file not shown.
|
@ -128,10 +128,30 @@ class TestShipField(TestCase):
|
|||
ship_field.set_ship_direction(1)
|
||||
self.assertEqual(ship_field.ship_direction, 1)
|
||||
|
||||
ship_field.set_ship_direction(0)
|
||||
self.assertEqual(ship_field.ship_direction, 0)
|
||||
|
||||
def test_set_ship_direction_outofrange(self):
|
||||
ship_field = ShipField() # Заводим объект типа ShipField
|
||||
ship_field.set_ship_direction(1)
|
||||
|
||||
ship_field.set_ship_direction(-1)
|
||||
ship_field.set_ship_direction(2)
|
||||
self.assertEqual(ship_field.ship_direction, 1)
|
||||
|
||||
def test_set_ship_direction_wrongtype(self):
|
||||
ship_field = ShipField() # Заводим объект типа ShipField
|
||||
ship_field.set_ship_direction(1)
|
||||
|
||||
ship_field.set_ship_direction(None)
|
||||
ship_field.set_ship_direction([2])
|
||||
ship_field.set_ship_direction({})
|
||||
self.assertEqual(ship_field.ship_direction, 1)
|
||||
|
||||
def test_toggle_ship_direction(self):
|
||||
self.fail()
|
||||
|
||||
#arrangement установка
|
||||
# action действие
|
||||
#assertion проверка
|
||||
ship_field = ShipField()
|
||||
ship_field.toggle_ship_direction()
|
||||
self.assertEqual(ship_field.ship_direction, 1)
|
||||
|
|
Loading…
Reference in New Issue