Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
NoTrendRes = mk.correlated_seasonal_test(NoTrendData, period=12)
assert NoTrendRes.trend == 'no trend'
assert NoTrendRes.h == False
assert NoTrendRes.Tau == 0.0
assert NoTrendRes.s == 0.0
# check with trendy data
TrendRes = mk.correlated_seasonal_test(TrendData, period=12)
assert TrendRes.trend == 'increasing'
assert TrendRes.h == True
assert round(TrendRes.p) == 0.0
assert TrendRes.Tau == 1.0
assert TrendRes.s == 5220.0
# check with arbitrary data
result = mk.correlated_seasonal_test(arbitrary_1d_data, period=12)
assert result.trend == 'no trend'
assert result.h == False
assert result.p == 0.06032641537423844
assert result.z == -1.878400366918792
assert result.Tau == -0.10054347826086957
assert result.s == -333.0
assert result.var_s == 31427.666666666664
def test_correlated_seasonal_test(NoTrendData, TrendData, arbitrary_1d_data):
# check with no trend data
NoTrendRes = mk.correlated_seasonal_test(NoTrendData, period=12)
assert NoTrendRes.trend == 'no trend'
assert NoTrendRes.h == False
assert NoTrendRes.Tau == 0.0
assert NoTrendRes.s == 0.0
# check with trendy data
TrendRes = mk.correlated_seasonal_test(TrendData, period=12)
assert TrendRes.trend == 'increasing'
assert TrendRes.h == True
assert round(TrendRes.p) == 0.0
assert TrendRes.Tau == 1.0
assert TrendRes.s == 5220.0
# check with arbitrary data
result = mk.correlated_seasonal_test(arbitrary_1d_data, period=12)
assert result.trend == 'no trend'
def test_correlated_seasonal_test(NoTrendData, TrendData, arbitrary_1d_data):
# check with no trend data
NoTrendRes = mk.correlated_seasonal_test(NoTrendData, period=12)
assert NoTrendRes.trend == 'no trend'
assert NoTrendRes.h == False
assert NoTrendRes.Tau == 0.0
assert NoTrendRes.s == 0.0
# check with trendy data
TrendRes = mk.correlated_seasonal_test(TrendData, period=12)
assert TrendRes.trend == 'increasing'
assert TrendRes.h == True
assert round(TrendRes.p) == 0.0
assert TrendRes.Tau == 1.0
assert TrendRes.s == 5220.0
# check with arbitrary data
result = mk.correlated_seasonal_test(arbitrary_1d_data, period=12)
assert result.trend == 'no trend'
assert result.h == False
assert result.p == 0.06032641537423844
assert result.z == -1.878400366918792
assert result.Tau == -0.10054347826086957
assert result.s == -333.0
assert result.var_s == 31427.666666666664