def test_clean_series_rejects_offset_timestamp(): rollup = 60 n = 5 start = to_datetime(rollup * 0) stop = to_datetime(rollup * n) series = [(rollup * (i * 1.1), i) for i in range(0, n)] with pytest.raises(AssertionError): clean_series(start, stop, rollup, series)
def test_clean_series_rejects_offset_timestamp(): rollup = 60 n = 5 start = to_datetime(rollup * 0) stop = to_datetime(rollup * n) series = [(rollup * (i * 1.1), i) for i in xrange(0, n)] with pytest.raises(AssertionError): clean_series(start, stop, rollup, series)
def test_clean_series_trims_extra(): rollup = 60 n = 5 start = to_datetime(rollup * 0) stop = to_datetime(rollup * n) series = [(rollup * i, i) for i in range(0, n + 1)] assert clean_series(start, stop, rollup, series) == series[:n]
def test_clean_series(): rollup = 60 n = 5 start = to_datetime(rollup * 0) stop = to_datetime(rollup * n) series = [(rollup * i, i) for i in xrange(0, n)] assert clean_series(start, stop, rollup, series) == series
def test_clean_series_trims_extra(): rollup = 60 n = 5 start = to_datetime(rollup * 0) stop = to_datetime(rollup * n) series = [(rollup * i, i) for i in xrange(0, n + 1)] assert clean_series(start, stop, rollup, series) == series[:n]
def test_clean_series(): rollup = 60 n = 5 start = to_datetime(rollup * 0) stop = to_datetime(rollup * n) series = [(rollup * i, i) for i in xrange(0, n)] assert clean_series( start, stop, rollup, series, ) == series