Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ts = [1, 2, 3, 4, 5, 6, 7, 8]
m = 4
idx = 0
exclusion_zone = scrimp.calc_exclusion_zone(m)
start = scrimp.calc_exclusion_start(idx, exclusion_zone)
expected_start = 0
assert(expected_start == start)
idx = 2
start = scrimp.calc_exclusion_start(idx, exclusion_zone)
expected_start = 1
assert(expected_start == start)
idx = 3
start = scrimp.calc_exclusion_start(idx, exclusion_zone)
expected_start = 2
assert(expected_start == start)
def test_calc_exclusion_start():
ts = [1, 2, 3, 4, 5, 6, 7, 8]
m = 4
idx = 0
exclusion_zone = scrimp.calc_exclusion_zone(m)
start = scrimp.calc_exclusion_start(idx, exclusion_zone)
expected_start = 0
assert(expected_start == start)
idx = 2
start = scrimp.calc_exclusion_start(idx, exclusion_zone)
expected_start = 1
assert(expected_start == start)
idx = 3
start = scrimp.calc_exclusion_start(idx, exclusion_zone)
expected_start = 2
assert(expected_start == start)
def test_calc_exclusion_start():
ts = [1, 2, 3, 4, 5, 6, 7, 8]
m = 4
idx = 0
exclusion_zone = scrimp.calc_exclusion_zone(m)
start = scrimp.calc_exclusion_start(idx, exclusion_zone)
expected_start = 0
assert(expected_start == start)
idx = 2
start = scrimp.calc_exclusion_start(idx, exclusion_zone)
expected_start = 1
assert(expected_start == start)
idx = 3
start = scrimp.calc_exclusion_start(idx, exclusion_zone)
expected_start = 2
assert(expected_start == start)