(self)
| 212 | assert h[1].model == "first" |
| 213 | |
| 214 | def test_history_limit(self) -> None: |
| 215 | now = time.time() |
| 216 | rs = RouteStats(storage=InMemoryRouteStatsStorage(), now_fn=lambda: now) |
| 217 | for i in range(10): |
| 218 | rs.record(_make_record(ts=now - 10 + i)) |
| 219 | assert len(rs.history(limit=3)) == 3 |
| 220 | |
| 221 | def test_reset(self) -> None: |
| 222 | rs = RouteStats(storage=InMemoryRouteStatsStorage()) |
nothing calls this directly
no test coverage detected