Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_sens_slope(NoTrendData, TrendData, arbitrary_1d_data):
# check with no trend data
NoTrendRes = mk.sens_slope(NoTrendData)
assert NoTrendRes.slope == 0.0
# check with trendy data
TrendRes = mk.sens_slope(TrendData)
assert TrendRes.slope == 1.0
assert round(TrendRes.intercept) == 0.0
result = mk.sens_slope(arbitrary_1d_data)
assert result.slope == -0.006369426751592357
assert result.intercept == 96.15286624203821
def test_sens_slope(NoTrendData, TrendData, arbitrary_1d_data):
# check with no trend data
NoTrendRes = mk.sens_slope(NoTrendData)
assert NoTrendRes.slope == 0.0
# check with trendy data
TrendRes = mk.sens_slope(TrendData)
assert TrendRes.slope == 1.0
assert round(TrendRes.intercept) == 0.0
result = mk.sens_slope(arbitrary_1d_data)
assert result.slope == -0.006369426751592357
assert result.intercept == 96.15286624203821
def test_sens_slope(NoTrendData, TrendData, arbitrary_1d_data):
# check with no trend data
NoTrendRes = mk.sens_slope(NoTrendData)
assert NoTrendRes.slope == 0.0
# check with trendy data
TrendRes = mk.sens_slope(TrendData)
assert TrendRes.slope == 1.0
assert round(TrendRes.intercept) == 0.0
result = mk.sens_slope(arbitrary_1d_data)
assert result.slope == -0.006369426751592357
assert result.intercept == 96.15286624203821