Orchestrata Ultimate › Tests › Reference › session › test_session_archive

Tests reference — tests/session/test_session_archive.py

Module of tests/session, split out because the directory page would be too large.

Prose pending.

tests/session/test_session_archive.py

source · 38 tests · 501 lines

Comprehensive tests for archive.py - SessionArchiver class.

Covers: core.tracing.traceability, session.archive, session.models

Kind Name Line Description
class TestSessionArchiverInit 80 Test SessionArchiver initialization.
method TestSessionArchiverInit.test_init_with_path_string 83 Test initialization with string path.
method TestSessionArchiverInit.test_init_with_path_object 88 Test initialization with Path object.
method TestSessionArchiverInit.test_jinja_env_initialized 94 Test Jinja environment is set up.
method TestSessionArchiverInit.test_constants 100 Test class constants.
class TestHistoryExists 115 Test history_exists() method.
method TestHistoryExists.test_history_not_exists 118 Test when history doesn't exist.
method TestHistoryExists.test_history_exists 122 Test when history exists.
class TestReadHistory 135 Test read_history() method.
method TestReadHistory.test_read_nonexistent_history 138 Test reading when history doesn't exist.
method TestReadHistory.test_read_existing_history 143 Test reading existing history.
class TestArchive 158 Test archive() method.
method TestArchive.test_archive_empty_list 161 Test archiving empty session list.
method TestArchive.test_archive_single_session 166 Test archiving single session.
method TestArchive.test_archive_multiple_sessions 176 Test archiving multiple sessions.
method TestArchive.test_archive_appends_to_existing 187 Test archiving appends to existing history.
method TestArchive.test_archive_preserves_header 194 Test archiving preserves header.
method TestArchive.test_archive_without_header 200 Test archiving without existing header.
class TestCountArchived 217 Test count_archived() method.
method TestCountArchived.test_count_no_history 220 Test count when no history.
method TestCountArchived.test_count_with_sessions 224 Test count with sessions.
class TestArchivedSessionNums 238 Test archived_session_nums() method.
method TestArchivedSessionNums.test_nums_no_history 241 Test nums when no history.
method TestArchivedSessionNums.test_nums_with_sessions 245 Test nums with sessions.
class TestSearch 260 Test search() method.
method TestSearch.test_search_no_history 263 Test search when no history.
method TestSearch.test_search_found 268 Test search finds match.
method TestSearch.test_search_not_found 274 Test search doesn't find non-existent.
method TestSearch.test_search_case_insensitive 279 Test search is case insensitive.
method TestSearch.test_search_returns_context 284 Test search returns context.
class TestGetArchivedSession 300 Test get_archived_session() method.
method TestGetArchivedSession.test_get_no_history 303 Test get when no history.
method TestGetArchivedSession.test_get_existing_session 308 Test get existing session.
method TestGetArchivedSession.test_get_nonexistent_session 314 Test get nonexistent session.
method TestGetArchivedSession.test_get_session_without_padding 319 Test get session with unpadded number.
class TestStats 335 Test stats() method.
method TestStats.test_stats_no_history 338 Test stats when no history.
method TestStats.test_stats_with_history 346 Test stats with history.
class TestClear 363 Test clear() method.
method TestClear.test_clear_no_history 366 Test clear when no history.
method TestClear.test_clear_with_history 371 Test clear with history.
class TestShouldArchive 386 Test should_archive() method.
method TestShouldArchive.test_should_archive_nonexistent_file 389 Test with nonexistent context file.
method TestShouldArchive.test_should_archive_small_file 395 Test with small context file.
method TestShouldArchive.test_should_archive_large_file 402 Test with large context file.
method TestShouldArchive.test_should_archive_exactly_at_limit 409 Test at exactly MAX_LINES.
method TestShouldArchive.test_should_archive_over_limit 416 Test just over MAX_LINES.
class TestSessionArchiverIntegration 432 Integration tests for SessionArchiver.
method TestSessionArchiverIntegration.test_full_workflow 435 Test complete archive workflow.
method TestSessionArchiverIntegration.test_multiple_archive_operations 472 Test multiple archive operations.