Orchestrata Ultimate › Tests › Reference › session › test_session_session_coverage

Tests reference — tests/session/test_session_session_coverage.py

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

Prose pending.

tests/session/test_session_session_coverage.py

source · 37 tests · 507 lines

Covers: session.context, session.exceptions, session.models, session.session

Kind Name Line Description
class TestResumeFileNotFound 137 resume() returns None when context files do not exist.
method TestResumeFileNotFound.test_resume_no_context_files 140 resume() should return None when no context.* files exist.
method TestResumeFileNotFound.test_resume_with_seq_no_context_files 145 resume(seq=...) should also return None on missing context.
class TestGetTestState 154 Exercise the pytest-collection branch and exception branch.
method TestGetTestState.test_get_test_state_subprocess_missing 157 When cwd does not exist, FileNotFoundError fires (lines 541-542).
method TestGetTestState.test_get_test_state_collects_pytest_output 162 Run _get_test_state with a tiny pytest tree.
class TestRunTests 182 Exercise _run_tests exception branch.
method TestRunTests.test_run_tests_subprocess_missing 185 Vanished cwd → FileNotFoundError → False (lines 554-555).
class TestCheckGitCleanMissingBinary 193 Exercise _check_git_clean FileNotFoundError fallback.
method TestCheckGitCleanMissingBinary.test_check_git_clean_no_cwd 196 Vanished cwd → True via the safety fallback.
class TestTagOpsMissingGit 205 Exercise FileNotFoundError fallback in tag creation/push.
method TestTagOpsMissingGit.test_create_tag_no_cwd 208 Vanished cwd → False on tag creation.
method TestTagOpsMissingGit.test_push_tag_no_cwd 223 Vanished cwd → False on push.
class TestFindChangelog 241 Exercise _find_changelog edge cases.
method TestFindChangelog.test_find_changelog_no_cwd 244 Vanished cwd → returns None gracefully.
method TestFindChangelog.test_find_changelog_no_repo 249 git rev-parse fails outside a repo → returns None.
method TestFindChangelog.test_find_changelog_in_repo_with_file 254 Returns Path when CHANGELOG.md exists at repo root.
class TestAutoCloseUnclosedMissingFile 266 Exercise _auto_close_unclosed when no context files exist.
method TestAutoCloseUnclosedMissingFile.test_auto_close_no_context 269 Returns None when no context files exist.
class TestValidateAndEnd 278 Exercise validate_and_end success and failure paths.
method TestValidateAndEnd.test_validate_and_end_no_active_raises 281 No active session → ChecklistError(['No active session']).
method TestValidateAndEnd.test_validate_and_end_collects_failures 287 An active session with no work logged collects multiple failures.
method TestValidateAndEnd.test_validate_and_end_dirty_repo_auto_commit 296 Dirty git working tree is auto-committed by end() — not a failure.
class TestGoalLifecycle 319 Exercise set_goal/get_goal/update_goal_status/get_goal_status/etc.
method TestGoalLifecycle.test_set_and_get_goal 322 set_goal persists the goal; get_goal returns it.
method TestGoalLifecycle.test_get_goal_returns_none_when_unset 333 get_goal returns None when no goal is set.
method TestGoalLifecycle.test_get_goal_status_no_goal 337 Lines 922-924: returns the 'no active goal' message.
method TestGoalLifecycle.test_get_goal_status_with_goal 342 Lines 925-941: renders the active goal block with criteria.
method TestGoalLifecycle.test_update_goal_status_no_goal_returns_none 355 Line 959: update_goal_status returns None with no goal.
method TestGoalLifecycle.test_update_goal_status_achieved 359 update_goal_status('achieved') sets achieved_at (line 962-963).
method TestGoalLifecycle.test_update_goal_status_abandoned 367 update_goal_status('abandoned') sets abandoned_at (lines 964-965).
method TestGoalLifecycle.test_log_goal_progress_no_goal_returns_none 375 Line 990: log_goal_progress returns None when no goal.
method TestGoalLifecycle.test_log_goal_progress_with_criteria_change 379 Lines 1001-1005: criteria_changed updates criterion + met_at.
method TestGoalLifecycle.test_log_goal_progress_with_non_met_criteria_change 394 criteria_changed with status != 'met' should not set met_at.
method TestGoalLifecycle.test_log_goal_progress_without_criteria_change 407 log_goal_progress without criteria_changed still appends a progress entry.
method TestGoalLifecycle.test_check_goal_before_stop_no_goal 414 Line 1023: empty string when no goal.
method TestGoalLifecycle.test_check_goal_before_stop_achieved 418 Line 1026: empty string when goal is achieved.
method TestGoalLifecycle.test_check_goal_before_stop_abandoned 424 Line 1026: empty string when goal is abandoned.
method TestGoalLifecycle.test_check_goal_before_stop_all_criteria_met 430 Line 1031: empty string when all criteria are met.
method TestGoalLifecycle.test_check_goal_before_stop_remaining 439 Lines 1034-1038: returns message listing unmet criteria.
method TestGoalLifecycle.test_check_goal_before_stop_no_criteria_active_goal 452 Active goal with no criteria → message warns about goal not achieved.
method TestGoalLifecycle.test_add_blocker_no_goal 460 Line 1058: add_blocker returns None without a goal.
method TestGoalLifecycle.test_add_blocker_with_goal 464 Lines 1056-1064: add_blocker appends and sets status='blocked'.
method TestGoalLifecycle.test_clear_blocker_no_goal 472 Line 1079: clear_blocker returns None without a goal.
method TestGoalLifecycle.test_clear_blocker_resets_status 476 clear_blocker empties blockers and resets status to 'active'.
class TestValidateAndEndPopulated 489 Even with everything set, _run_tests will fail in the temp env. We
method TestValidateAndEndPopulated.test_validate_and_end_invokes_full_path 494 Whether it raises or returns, validate_and_end runs all checks.