Coast Toggle

This commit is contained in:
firestar5683
2026-04-20 12:09:36 -05:00
parent 688e0c3fc0
commit bbc1737fbd
50 changed files with 68 additions and 4 deletions
+23
View File
@@ -217,6 +217,29 @@ class TestManager:
assert params.get("ClusterOffset") == "1.02"
assert params_cache.get("ClusterOffset") is None
def test_migrate_coast_up_to_leads_default_seeds_enabled(self, tmp_path, monkeypatch):
monkeypatch.setattr(manager, "STARPILOT_COAST_UP_TO_LEADS_MIGRATION_FLAG", tmp_path / "starpilot_coast_up_to_leads_v1")
params = FileBackedFakeParams(tmp_path / "params", {})
params_cache = FileBackedFakeParams(tmp_path / "cache", {})
manager.migrate_coast_up_to_leads_default(params, params_cache)
assert params.get_bool("CoastUpToLeads")
assert params_cache.get_bool("CoastUpToLeads")
def test_migrate_coast_up_to_leads_default_preserves_existing_values(self, tmp_path, monkeypatch):
monkeypatch.setattr(manager, "STARPILOT_COAST_UP_TO_LEADS_MIGRATION_FLAG", tmp_path / "starpilot_coast_up_to_leads_v1")
params = FileBackedFakeParams(tmp_path / "params", {
"CoastUpToLeads": False,
})
params_cache = FileBackedFakeParams(tmp_path / "cache", {})
manager.migrate_coast_up_to_leads_default(params, params_cache)
assert not params.get_bool("CoastUpToLeads")
@pytest.mark.skip("this test is flaky the way it's currently written, should be moved to test_onroad")
def test_clean_exit(self, subtests):
"""