Spaces:
Sleeping
Sleeping
File size: 512 Bytes
e04bbc2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | from analysis.params import AnalysisParams, DEFAULT_PARAMS
def test_default_params_match_notebook():
p = DEFAULT_PARAMS
assert p.v_threshold == 150
assert p.min_area == 100
assert p.h == 5
assert p.large_kernel == 7
def test_params_round_trip_through_dict():
p = AnalysisParams(v_threshold=200, min_area=50)
assert AnalysisParams(**p.to_dict()) == p
def test_params_clamp_kernel_to_odd():
p = AnalysisParams(large_kernel=8)
assert p.large_kernel == 9
|