示例#1
0
def test_stop_linear():
    driver = Driver()
    driver.angular.value = 1
    driver.linear.value = 1
    driver.stop(Driver.LINEAR)
    assert driver.angular.value == 1
    assert driver.linear.value == 0
示例#2
0
def test_stop_angular():
    driver = Driver()
    driver.angular.value = 1
    driver.linear.value = 1
    driver.stop(Driver.ANGULAR)
    assert driver.angular.value == 0
    assert driver.linear.value == 1
示例#3
0
def test_stop():
    driver = Driver()
    driver.angular.value = 1
    driver.linear.value = 1
    driver.stop()
    assert driver.angular.value == 0
    assert driver.linear.value == 0