Esempio n. 1
0
def test_ship_setters():
    ship = Ship(4, [(3, 2), (3, 3), (3, ), (3, 5)], 'poziom')
    ship.set_location([(2, 5), (2, 6), (2, 7)])
    ship.set_size(3)
    ship.set_direction('pion')
    assert ship.get_location() == [(2, 5), (2, 6), (2, 7)]
    assert ship.get_size() == 3
    assert ship.get_direction() == 'pion'
Esempio n. 2
0
def test_ship_getters():
    ship = Ship(4, [(3, 2), (3, 3), (3, 4), (3, 5)], 'poziom')
    assert ship.get_location() == [(3, 2), (3, 3), (3, 4), (3, 5)]
    assert ship.get_size() == 4
    assert ship.get_direction() == 'poziom'