mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-22 00:33:44 +08:00
Coast Toggle
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user