def test_run_in_VM(func_name, params, expected_result):
    actual = rtseqrunner.run_rtseq_in_VM(func_name, 0.01)
    # some of these functions are time sensitive so we can't know what to expect
    # so if the expected result is None we just check that a non-zero value got returned
    if expected_result is None:
        assert actual >= 0
    else:
        assert actual == expected_result
Exemplo n.º 2
0
def test_run_in_VM(func_name, params, expected_result):
    actual = rtseqrunner.run_rtseq_in_VM(func_name)
    assert actual == expected_result[0]
Exemplo n.º 3
0
def test_gen_continue_no_fail():
    assert _generate_continue_no_fail() == 2
    assert rtseqrunner.run_rtseq_in_VM(_generate_continue_no_fail) == 2
    assert realtimesequencetools.run_py_as_rtseq(_generate_continue_no_fail) == 2
def test_channel_ref_array_run():
    result = rtseqrunner.run_rtseq_in_VM(
        testfunctions.channel_ref_array_validate_getter)
    assert result == 5