Orchestrata Ultimate › Tests › Reference › claude › test_session_context_coverage
Tests reference — tests/claude/test_session_context_coverage.py
Module of tests/claude, split out because the directory page would be too large.
Prose pending.
tests/claude/test_session_context_coverage.py
source · 25 tests · 437 lines
Line-coverage tests for
claude/tools/session/context.py.
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_read_without_any_file_raises |
65 | |
| function | test_read_falls_back_to_markdown_parse |
70 | With ONLY context.md on disk (the pre-JSON layout), read() must parse |
| function | test_parse_handles_unparseable_date_and_upcoming_steps |
101 | Hand-written history markdown: a session block whose date does not |
| function | test_recover_json_salvages_trailing_garbage_and_repairs |
149 | |
| function | test_recover_json_restores_from_backup |
162 | |
| function | test_recover_json_raises_when_unrecoverable |
174 | |
| function | test_write_json_skips_backup_of_corrupt_current_file |
181 | |
| function | test_write_json_backs_up_valid_current_file |
192 | |
| function | test_atomic_write_cleans_tmp_when_target_is_a_directory |
203 | |
| function | test_read_latest_session_empty_and_populated |
217 | |
| function | test_update_session_missing_returns_none |
227 | |
| function | test_update_state_ignores_unknown_fields |
232 | |
| function | test_complete_work_by_index_range_and_success |
242 | |
| function | test_complete_work_contains_none_ambiguous_single |
256 | |
| function | test_max_session_from_history_absent_and_empty |
279 | |
| function | test_max_session_from_history_finds_max |
287 | |
| function | test_max_session_from_tags_not_a_repo |
296 | |
| function | test_max_session_from_tags_no_matching_tags |
301 | |
| function | test_max_session_from_tags_parses_session_tags |
321 | |
| function | test_next_session_num_takes_max_of_all_sources |
343 | |
| function | test_next_session_num_fresh_project_is_zero |
367 | |
| function | test_archive_sessions_noop_at_or_below_limit |
381 | |
| function | test_archive_sessions_moves_oldest_to_history |
391 | |
| function | test_archive_sessions_prepends_to_existing_history |
404 | |
| function | test_add_session_triggers_archive_when_context_exceeds_line_limit |
418 | _maybe_archive: each add_session re-measures context.md, and once the |