(self, tmp_path)
| 434 | assert dist["timeout"] == 1 |
| 435 | |
| 436 | def test_pass_rate(self, tmp_path): |
| 437 | logger = AuditLogger(str(tmp_path / "audit.jsonl")) |
| 438 | for passed in [True, True, False]: |
| 439 | logger.log(AuditRecord( |
| 440 | audit_id="id", timestamp="t", prompt_hash="h", |
| 441 | attempt=1, failure_mode=FailureMode.NONE, latency_ms=1.0, |
| 442 | token_count=10, passed=passed, strategy=RetryStrategy.NONE, |
| 443 | )) |
| 444 | assert abs(logger.pass_rate() - 2/3) < 0.01 |
| 445 | |
| 446 | def test_thread_safe_writes(self, tmp_path): |
| 447 | logger = AuditLogger(str(tmp_path / "audit.jsonl")) |
nothing calls this directly
no test coverage detected