コード例 #1
0
ファイル: test_units.py プロジェクト: robotpy/robotpy-wpimath
def test_units_check_default_by_num2():
    sc = wpimath_test.SomeClass()

    assert sc.checkDefaultByNum2(0.050) == True
    assert sc.checkDefaultByNum2() == True

    with pytest.raises(RuntimeError):
        sc.checkDefaultByNum2(100)
コード例 #2
0
ファイル: test_units.py プロジェクト: robotpy/robotpy-wpimath
def test_units_s2ms():
    sc = wpimath_test.SomeClass()

    assert sc.s2ms(0.2) == 200.0
コード例 #3
0
ファイル: test_units.py プロジェクト: robotpy/robotpy-wpimath
def test_units_ms2s():
    sc = wpimath_test.SomeClass()

    assert sc.ms2s(20) == 0.020
コード例 #4
0
ファイル: test_units.py プロジェクト: robotpy/robotpy-wpimath
def test_units_ft2m():
    sc = wpimath_test.SomeClass()

    assert sc.ft2m(3) == 0.9144