def test_probability_ratio(): sel = SpringShootingSelector(delta_max=1, k_spring=1) sel._acceptable_snapshot = True ratio = sel.probability_ratio(None, None, None) assert ratio == 1.0 sel._acceptable_snapshot = False ratio = sel.probability_ratio(None, None, None) assert ratio == 0.0
def test_probability_ratio(): sel = SpringShootingSelector(delta_max=1, k_spring=1) sel._acceptable_snapshot = True # TODO OPS 2.0: Last value here is not None to silence deprecation # warnings, should be set to None after the completion ratio = sel.probability_ratio(None, None, None, 1) assert ratio == 1.0 sel._acceptable_snapshot = False # TODO OPS 2.0: Last value here is not None to silence deprecation # warnings, should be set to None after the completion ratio = sel.probability_ratio(None, None, None, 1) assert ratio == 0.0