Fix pre-existing test failures in test_writer and test_metrics
test_writer: _dummy_metrics() and test_build_summary_required_fields were missing np_power_w=None after the field was added to ComputedMetrics. test_metrics: the leading-zero elevation heuristic fired on a single 0.0 start value, incorrectly skipping the first legitimate elevation step. Guard now requires at least 2 consecutive near-zero leading values before activating the Apple Watch lock-acquisition workaround.
This commit is contained in:
@@ -67,7 +67,7 @@ def _dummy_metrics(**overrides):
|
||||
elevation_gain_m=100.0, elevation_loss_m=95.0,
|
||||
avg_speed_kmh=10.0, max_speed_kmh=20.0,
|
||||
avg_hr_bpm=None, max_hr_bpm=None,
|
||||
avg_cadence_rpm=None, avg_power_w=None, max_power_w=None,
|
||||
avg_cadence_rpm=None, avg_power_w=None, np_power_w=None, max_power_w=None,
|
||||
bbox=None, start_latlng=None, end_latlng=None,
|
||||
mmp=None, best_efforts=None, best_climb_m=None,
|
||||
)
|
||||
@@ -208,6 +208,7 @@ def test_build_summary_required_fields():
|
||||
max_hr_bpm=None,
|
||||
avg_cadence_rpm=None,
|
||||
avg_power_w=None,
|
||||
np_power_w=None,
|
||||
max_power_w=None,
|
||||
bbox=None,
|
||||
start_latlng=None,
|
||||
|
||||
Reference in New Issue
Block a user