Orchestrata Ultimate › Tests › Reference › session › test_archive_coverage
Tests reference — tests/session/test_archive_coverage.py
Module of tests/session, split out because the directory page would be too large.
Prose pending.
tests/session/test_archive_coverage.py
source · 29 tests · 283 lines
Coverage tests for session.archive — SessionArchiver.
Covers: session.archive, session.models
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestHistoryBasics |
43 | Test basic history file operations. |
| method | TestHistoryBasics.test_history_not_exists |
46 | Test history_exists returns False initially. |
| method | TestHistoryBasics.test_read_empty_history |
50 | Test read_history returns empty string when no file. |
| method | TestHistoryBasics.test_read_history_with_content |
54 | Test read_history returns file content. |
| class | TestArchive |
63 | Test session archiving. |
| method | TestArchive.test_archive_empty_list |
66 | Test archiving empty list does nothing. |
| method | TestArchive.test_archive_single_session |
71 | Test archiving a single session creates file. |
| method | TestArchive.test_archive_multiple_sessions |
79 | Test archiving multiple sessions. |
| method | TestArchive.test_archive_appends_to_existing |
88 | Test archiving appends to existing history. |
| method | TestArchive.test_archive_creates_header |
96 | Test archive creates header on new file. |
| method | TestArchive.test_archive_existing_without_header |
102 | Test archive adds header to existing file without one. |
| class | TestCountArchived |
114 | Test archived session counting. |
| method | TestCountArchived.test_count_no_history |
117 | Test count returns 0 when no history. |
| method | TestCountArchived.test_count_after_archive |
121 | Test count matches archived sessions. |
| class | TestArchivedSessionNums |
130 | Test archived session number extraction. |
| method | TestArchivedSessionNums.test_nums_no_history |
133 | Test returns empty list when no history. |
| method | TestArchivedSessionNums.test_nums_after_archive |
137 | Test returns correct session numbers. |
| class | TestSearch |
148 | Test history search. |
| method | TestSearch.test_search_no_history |
151 | Test search returns empty when no history. |
| method | TestSearch.test_search_finds_match |
155 | Test search finds matching content. |
| method | TestSearch.test_search_case_insensitive |
162 | Test search is case-insensitive. |
| method | TestSearch.test_search_returns_context |
168 | Test search results include context lines. |
| method | TestSearch.test_search_no_match |
177 | Test search returns empty for no match. |
| class | TestGetArchivedSession |
187 | Test retrieving specific archived session. |
| method | TestGetArchivedSession.test_get_no_history |
190 | Test returns None when no history. |
| method | TestGetArchivedSession.test_get_existing_session |
194 | Test retrieving an existing archived session. |
| method | TestGetArchivedSession.test_get_nonexistent_session |
202 | Test returns None for non-existent session. |
| class | TestStats |
211 | Test history statistics. |
| method | TestStats.test_stats_no_history |
214 | Test stats when no history file exists. |
| method | TestStats.test_stats_with_history |
222 | Test stats with populated history. |
| class | TestClear |
235 | Test history clearing. |
| method | TestClear.test_clear_no_history |
238 | Test clear returns False when no history. |
| method | TestClear.test_clear_existing_history |
242 | Test clear removes history file. |
| class | TestShouldArchive |
252 | Test should_archive logic. |
| method | TestShouldArchive.test_should_archive_missing_file |
255 | Test returns False when context.md doesn't exist. |
| method | TestShouldArchive.test_should_archive_small_file |
261 | Test returns False when file is small. |
| method | TestShouldArchive.test_should_archive_large_file |
269 | Test returns True when file exceeds MAX_LINES. |
| method | TestShouldArchive.test_should_archive_exactly_at_limit |
277 | Test returns False when file is exactly at limit. |