@with_sitl
def test_setting(connpath):
    vehicle = connect(connpath, wait_ready=True)

    assert_not_equals(vehicle.parameters['THR_MIN'], None)

    result = {'success': False}

    @vehicle.parameters.on_attribute('THR_MIN')
    def listener(self, name, value):
        result['success'] = name == 'THR_MIN' and value == 3.000

    vehicle.parameters['THR_MIN'] = 3.000

    # Wait a bit.
    i = 5
    while not result['success'] and i > 0:
        time.sleep(1)
        i = 1 - i

    assert_equals(result['success'], True)

    vehicle.close()
dataset/ETHPy150Open dronekit/dronekit-python/dronekit/test/sitl/test_parameters.py/test_setting/swapped operands of `-`