(make_persisted_record)
| 57 | |
| 58 | |
| 59 | def test_join_drops_orphans(make_persisted_record): |
| 60 | from evaluation.models import PersistedTrajectory |
| 61 | |
| 62 | scenarios = [ |
| 63 | Scenario.from_raw({"id": 1, "text": "Q1"}), |
| 64 | Scenario.from_raw({"id": 2, "text": "Q2"}), |
| 65 | ] |
| 66 | trajs = [ |
| 67 | PersistedTrajectory.from_raw(make_persisted_record(scenario_id=1)), |
| 68 | PersistedTrajectory.from_raw(make_persisted_record(run_id="r2", scenario_id=99)), |
| 69 | ] |
| 70 | pairs = list(join_records(scenarios, trajs)) |
| 71 | assert len(pairs) == 1 |
| 72 | assert pairs[0][0].id == "1" |
| 73 | |
| 74 | |
| 75 | def test_load_trajectory_uses_filename_as_scenario_id_when_missing(tmp_path): |
nothing calls this directly
no test coverage detected