(self, project_dir)
| 4213 | RunState.load(bad_run_id, project_dir) |
| 4214 | |
| 4215 | def test_append_log(self, project_dir): |
| 4216 | from specify_cli.workflows.engine import RunState |
| 4217 | |
| 4218 | state = RunState( |
| 4219 | run_id="log-test", |
| 4220 | workflow_id="test", |
| 4221 | project_root=project_dir, |
| 4222 | ) |
| 4223 | state.append_log({"event": "test_event", "data": "hello"}) |
| 4224 | |
| 4225 | log_file = state.runs_dir / "log.jsonl" |
| 4226 | assert log_file.exists() |
| 4227 | lines = log_file.read_text().strip().split("\n") |
| 4228 | entry = json.loads(lines[0]) |
| 4229 | assert entry["event"] == "test_event" |
| 4230 | assert "timestamp" in entry |
| 4231 | |
| 4232 | |
| 4233 | class TestListRuns: |
nothing calls this directly
no test coverage detected