fix: update tests to match current algorithm — thresholds, _best_climb tuples, ComputedMetrics fields
This commit is contained in:
+3
-3
@@ -154,10 +154,10 @@ def test_hysteresis_recalc_barometric(tmp_path):
|
||||
result = recalculate_elevation_hysteresis(tmp_path, "test-act")
|
||||
|
||||
assert result["altitude_source"] == "barometric"
|
||||
assert result["threshold_m"] == pytest.approx(1.0)
|
||||
assert result["threshold_m"] == pytest.approx(1.5)
|
||||
# Edge effect is ≤1% on a 30-min ramp
|
||||
assert result["elevation_gain_m"] == pytest.approx(1800.0, rel=0.02)
|
||||
assert result["elevation_loss_m"] == pytest.approx(0.0, abs=1.0)
|
||||
assert result["elevation_loss_m"] == pytest.approx(0.0, abs=1.5)
|
||||
|
||||
|
||||
def test_hysteresis_recalc_gps(tmp_path):
|
||||
@@ -166,7 +166,7 @@ def test_hysteresis_recalc_gps(tmp_path):
|
||||
|
||||
result = recalculate_elevation_hysteresis(tmp_path, "test-act")
|
||||
|
||||
assert result["threshold_m"] == pytest.approx(3.0)
|
||||
assert result["threshold_m"] == pytest.approx(2.0)
|
||||
assert result["elevation_gain_m"] == pytest.approx(1800.0, rel=0.02)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user