(self, tmp_path, monkeypatch)
| 577 | assert count_sessions() == 2 |
| 578 | |
| 579 | def test_load_limit_respected(self, tmp_path, monkeypatch): |
| 580 | import openosint.session_history as sh |
| 581 | |
| 582 | monkeypatch.setattr(sh, "HISTORY_DIR", tmp_path / "history") |
| 583 | from openosint.session_history import SessionRecord, load_sessions, save_session |
| 584 | |
| 585 | for i in range(5): |
| 586 | save_session( |
| 587 | SessionRecord( |
| 588 | timestamp=f"2026-05-17T1{i}:00:00", |
| 589 | duration_seconds=i, |
| 590 | ) |
| 591 | ) |
| 592 | sessions = load_sessions(limit=3) |
| 593 | assert len(sessions) == 3 |
| 594 | |
| 595 | def test_clear_sessions_deletes_all(self, tmp_path, monkeypatch): |
| 596 | import openosint.session_history as sh |
nothing calls this directly
no test coverage detected