Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
assert NoTrendRes.p == 1.0
assert NoTrendRes.z == 0
assert NoTrendRes.Tau == 0.0
assert NoTrendRes.s == 0.0
assert NoTrendRes.var_s == 0.0
# check with trendy data
TrendRes = mk.original_test(TrendData)
assert TrendRes.trend == 'increasing'
assert TrendRes.h == True
assert TrendRes.p == 0.0
assert TrendRes.Tau == 1.0
assert TrendRes.s == 64620.0
# check with arbitrary data
result = mk.original_test(arbitrary_1d_data)
assert result.trend == 'no trend'
assert result.h == False
assert result.p == 0.37591058740506833
assert result.z == -0.8854562842589916
assert result.Tau == -0.03153167653875869
assert result.s == -1959.0
assert result.var_s == 4889800.333333333
def test_original_test(NoTrendData, TrendData, arbitrary_1d_data):
# check with no trend data
NoTrendRes = mk.original_test(NoTrendData)
assert NoTrendRes.trend == 'no trend'
assert NoTrendRes.h == False
assert NoTrendRes.p == 1.0
assert NoTrendRes.z == 0
assert NoTrendRes.Tau == 0.0
assert NoTrendRes.s == 0.0
assert NoTrendRes.var_s == 0.0
# check with trendy data
TrendRes = mk.original_test(TrendData)
assert TrendRes.trend == 'increasing'
assert TrendRes.h == True
assert TrendRes.p == 0.0
assert TrendRes.Tau == 1.0
assert TrendRes.s == 64620.0
def test_original_test(NoTrendData, TrendData, arbitrary_1d_data):
# check with no trend data
NoTrendRes = mk.original_test(NoTrendData)
assert NoTrendRes.trend == 'no trend'
assert NoTrendRes.h == False
assert NoTrendRes.p == 1.0
assert NoTrendRes.z == 0
assert NoTrendRes.Tau == 0.0
assert NoTrendRes.s == 0.0
assert NoTrendRes.var_s == 0.0
# check with trendy data
TrendRes = mk.original_test(TrendData)
assert TrendRes.trend == 'increasing'
assert TrendRes.h == True
assert TrendRes.p == 0.0
assert TrendRes.Tau == 1.0
assert TrendRes.s == 64620.0
# check with arbitrary data
result = mk.original_test(arbitrary_1d_data)
assert result.trend == 'no trend'
assert result.h == False
assert result.p == 0.37591058740506833
assert result.z == -0.8854562842589916
assert result.Tau == -0.03153167653875869
assert result.s == -1959.0
assert result.var_s == 4889800.333333333