Orchestrata Ultimate › Tests › Reference › session › test_context_extended

Tests reference — tests/session/test_context_extended.py

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

Prose pending.

tests/session/test_context_extended.py

source · 23 tests · 515 lines

Extended coverage tests for session.context — ContextFileManager.

Covers: session.context, session.models

Kind Name Line Description
class TestGetMaxSessionFromTags 97 Cover tag-scan edge cases.
method TestGetMaxSessionFromTags.test_empty_tag_list_returns_minus_one 100 Git repo with no session-* tags => return -1.
method TestGetMaxSessionFromTags.test_smaller_tag_after_larger 105 Tags session-10 then session-2; lexicographic order processes
class TestNextSessionNum 128 Cover next_session_num when files are missing.
method TestNextSessionNum.test_no_files_returns_zero 131 When no context files exist, next session num is 0.
class TestVerifyHistoryIntegrityExtended 140 Cover branches with missing files.
method TestVerifyHistoryIntegrityExtended.test_only_history_no_json 143 History exists but JSON is missing.
method TestVerifyHistoryIntegrityExtended.test_only_json_no_ctx_file 153 JSON exists but rendered markdown is missing.
method TestVerifyHistoryIntegrityExtended.test_only_history_continuity_skipped 160 Only history, no JSON => continuity check skipped.
method TestVerifyHistoryIntegrityExtended.test_only_json_continuity_skipped 170 Only JSON, no history => continuity check skipped.
method TestVerifyHistoryIntegrityExtended.test_continuity_ok 178 History max < JSON min => continuity is OK.
class TestRecoverFromGitExtended 191 Cover recover_from_git paths: history exists, show failure,
method TestRecoverFromGitExtended.test_history_exists_adds_known_nums 196 Existing history file populates known_nums (lines 527-529).
method TestRecoverFromGitExtended.test_git_show_failure_skips_commit 213 A commit where context.json was deleted => git show fails => continue.
method TestRecoverFromGitExtended.test_recovers_new_sessions 238 Commits with sessions not in current context are recovered.
method TestRecoverFromGitExtended.test_already_present_sessions_tracked 271 Commits with sessions already known are marked already_present.
method TestRecoverFromGitExtended.test_session_already_in_recovered 306 Same session in multiple commits: second commit sees it in
method TestRecoverFromGitExtended.test_appends_to_existing_history 342 Recovered sessions append when history file already exists.
method TestRecoverFromGitExtended.test_creates_new_history_file 369 Recovered sessions create history file when none exists.
method TestRecoverFromGitExtended.test_no_current_json 397 Recover works even when current context.json is missing.
class TestParseCurrentStateExtended 423 Cover missing Status line branch.
method TestParseCurrentStateExtended.test_no_status_line 426 Current State block without Status: line leaves default.
method TestParseCurrentStateExtended.test_parse_current_state_minimal 442 Current State with only required lines covers missing branches
class TestParseCarryoverTasksExtended 458 Cover branches for non-standard task lines.
method TestParseCarryoverTasksExtended.test_non_dash_line_skipped 461 Lines not starting with '- ' are skipped.
method TestParseCarryoverTasksExtended.test_no_checkbox 469 Task line without [ ] / [x] checkbox.
method TestParseCarryoverTasksExtended.test_no_priority 478 Task line with checkbox but no priority tag.
method TestParseCarryoverTasksExtended.test_no_notes 485 Task line without trailing parenthetical notes.
class TestParseSessionRecordExtended 496 Cover Next Steps lines without dash prefix.
method TestParseSessionRecordExtended.test_next_steps_non_dash_ignored 499 Lines in Next Steps not starting with '- ' are ignored.