def test_create_list_no_labels(trace1, trace2): traces = [trace1, trace2] ets = EnergyTraceSet(traces) assert len(list(ets.itertraces())) == 2 assert list(ets.itertraces())[0][0] in ['0', '1'] assert list(ets.itertraces())[1][0] in ['0', '1']
def test_create_list(trace1, trace2): traces = [trace1, trace2] labels = ["t1", "t2"] ets = EnergyTraceSet(traces, labels) assert len(list(ets.itertraces())) == 2 assert list(ets.itertraces())[0][0] in ['t1', 't2'] assert list(ets.itertraces())[1][0] in ['t1', 't2']
def test_create_dict(trace1, trace2): trace_dict = {"t1": trace1, "t2": trace2} ets = EnergyTraceSet(trace_dict) assert len(list(ets.itertraces())) == 2 assert list(ets.itertraces())[0][0] in ['t1', 't2'] assert list(ets.itertraces())[1][0] in ['t1', 't2']