def test_itertimes_number(): gen = default_generator(list_value) sts = SimulatedTimeSeries(gen) i = 0 for x in sts.itertimes(): assert x == i i += 1
def test_itertimes_tuple(): gen_tuple = default_generator(list_tuple) sts = SimulatedTimeSeries(gen_tuple) i = 0 for x in sts.itertimes(): assert x == list_tuple[i][0] i += 1
def test_iter_time(): ts = SimulatedTimeSeries(make_data(0, 3)) assert list(ts.itertimes()) == [0, 1, 2, 3]