Exemple #1
0
def test_as_list_with_illegal_mode_raises_error():
    trace = Trace([[0, 0], [1, 5]])
    with pytest.raises(ValueError) as excinfo:
        trace.as_list('wrong mode')
    assert 'invalid mode' in str(excinfo.value).lower()
Exemple #2
0
def test_as_list(data, mode, expected):
    trace = Trace(data)
    if expected is None:
        expected = data
    assert trace.as_list(mode=mode) == expected