Commit 934ce76e authored by Aurélien Campéas's avatar Aurélien Campéas
Browse files

test: remove useless tests

parent ea027c7a8174
......@@ -43,95 +43,6 @@ def test_rename(engine, tsh):
assert tsh.upstream.get(engine, 'renamed') is not None
def test_non_monotonic_autodiff(engine, tsh):
s1 = pd.Series([1, 3], index=[utcdt(2018, 1, 1), utcdt(2018, 1, 3)])
s2 = pd.Series([2, 3.1], index=[utcdt(2018, 1, 2), utcdt(2018, 1, 3)])
tsh.insert(engine, s1, 'nmdiff', 'Babar')
# all is well, but we have to index sort the intermediate diff
# in .insert
tsh.insert(engine, s2, 'nmdiff', 'Celeste')
def test_differential(engine, tsh):
ts_begin = genserie(datetime(2010, 1, 1), 'D', 10)
tsh.insert(engine, ts_begin, 'ts_test', 'test')
assert_df("""
2010-01-01 0.0
2010-01-02 1.0
2010-01-03 2.0
2010-01-04 3.0
2010-01-05 4.0
2010-01-06 5.0
2010-01-07 6.0
2010-01-08 7.0
2010-01-09 8.0
2010-01-10 9.0
""", tsh.get(engine, 'ts_test'))
# we should detect the emission of a message
tsh.insert(engine, ts_begin, 'ts_test', 'test')
assert_df("""
2010-01-01 0.0
2010-01-02 1.0
2010-01-03 2.0
2010-01-04 3.0
2010-01-05 4.0
2010-01-06 5.0
2010-01-07 6.0
2010-01-08 7.0
2010-01-09 8.0
2010-01-10 9.0
""", tsh.get(engine, 'ts_test'))
ts_slight_variation = ts_begin.copy()
ts_slight_variation.iloc[3] = 0
ts_slight_variation.iloc[6] = 0
tsh.insert(engine, ts_slight_variation, 'ts_test', 'test')
assert_df("""
2010-01-01 0.0
2010-01-02 1.0
2010-01-03 2.0
2010-01-04 0.0
2010-01-05 4.0
2010-01-06 5.0
2010-01-07 0.0
2010-01-08 7.0
2010-01-09 8.0
2010-01-10 9.0
""", tsh.get(engine, 'ts_test'))
ts_longer = genserie(datetime(2010, 1, 3), 'D', 15)
ts_longer.iloc[1] = 2.48
ts_longer.iloc[3] = 3.14
ts_longer.iloc[5] = ts_begin.iloc[7]
tsh.insert(engine, ts_longer, 'ts_test', 'test')
assert_df("""
2010-01-01 0.00
2010-01-02 1.00
2010-01-03 0.00
2010-01-04 2.48
2010-01-05 2.00
2010-01-06 3.14
2010-01-07 4.00
2010-01-08 7.00
2010-01-09 6.00
2010-01-10 7.00
2010-01-11 8.00
2010-01-12 9.00
2010-01-13 10.00
2010-01-14 11.00
2010-01-15 12.00
2010-01-16 13.00
2010-01-17 14.00
""", tsh.get(engine, 'ts_test'))
def test_manual_overrides(engine, tsh):
# start testing manual overrides
ts_begin = genserie(datetime(2010, 1, 1), 'D', 5, [2.])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment