示例#1
0
def test_write_wall_writes_all_servos_on_wall(mock_comm):
    wall = Wall(comm=mock_comm)
    wall.write([
        [0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
        [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
        [0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
        [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
    ])

    for servo in wall.list_servos():
        assert servo.position == 0.5
示例#2
0
def test_init_wall_creates_correct_number_of_servos(mock_comm):
    wall = Wall(comm=mock_comm)
    assert len(wall.list_servos()) == 26
示例#3
0
def test_init_wall_sets_list_servos_to_starting_position(mock_comm):
    wall = Wall(comm=mock_comm)
    for servo in wall.list_servos():
        assert servo.position == -1.0