Пример #1
0
def test_orientation_filled(testinp, results):
    dyncon = OSC.Orientation(h=testinp[0],
                             p=testinp[1],
                             r=testinp[2],
                             reference=testinp[3])

    assert dyncon.is_filled() == results
Пример #2
0
def test_orientation(testinp, results):
    dyncon = OSC.Orientation(h=testinp[0],
                             p=testinp[1],
                             r=testinp[2],
                             reference=testinp[3])
    print(dyncon.get_attributes())
    assert len(dyncon.get_attributes()) == results
Пример #3
0
def test_relativeobjectposition():

    pos = OSC.RelativeObjectPosition('Ego', 1, 2, 0)
    OSC.prettyprint(pos.get_element())

    pos = OSC.RelativeObjectPosition('Target',
                                     1,
                                     2,
                                     0,
                                     orientation=OSC.Orientation(h=0.2))
    OSC.prettyprint(pos.get_element())
Пример #4
0
def test_orientation_failed():
    with pytest.raises(ValueError):
        OSC.Orientation(reference='hej')