Orchestrata Ultimate › Tests › Reference › session › test_session_session

Tests reference — tests/session/test_session_session.py

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

Prose pending.

tests/session/test_session_session.py

source · 55 tests · 731 lines

Comprehensive tests for session.py - SessionController class.

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

Kind Name Line Description
class TestSessionControllerInit 47 Test SessionController initialization.
method TestSessionControllerInit.test_init_with_path_string 50 Test initialization with string path.
method TestSessionControllerInit.test_init_with_path_object 55 Test initialization with Path object.
method TestSessionControllerInit.test_init_with_custom_model 63 Test initialization with custom AI model.
class TestActiveSession 72 Test active_session property.
method TestActiveSession.test_active_session_none 75 Test active_session when no session.
method TestActiveSession.test_active_session_with_session 79 Test active_session with active session.
class TestBegin 89 Test begin() method.
method TestBegin.test_begin_creates_session 92 Test begin creates session.
method TestBegin.test_begin_sets_active 98 Test begin sets _active.
method TestBegin.test_begin_with_objectives 103 Test begin with objectives.
method TestBegin.test_begin_sets_ai_model 109 Test begin uses controller's AI model.
method TestBegin.test_begin_persists 114 Test begin persists to file.
method TestBegin.test_begin_increments_seq 120 Test begin increments sequence number.
class TestEnd 136 Test end() method.
method TestEnd.test_end_no_active 139 Test end when no active session.
method TestEnd.test_end_returns_session 144 Test end returns the session.
method TestEnd.test_end_clears_active 149 Test end clears _active.
method TestEnd.test_end_with_achievements 154 Test end with achievements.
method TestEnd.test_end_with_upcoming 159 Test end with upcoming.
method TestEnd.test_end_calculates_length 164 Test end calculates length.
class TestLogWork 174 Test log_work() method.
method TestLogWork.test_log_work_no_session 177 Test log_work with no session does nothing.
method TestLogWork.test_log_work_basic 183 Test log_work basic.
method TestLogWork.test_log_work_with_details 190 Test log_work with details.
class TestLogArtifact 200 Test log_artifact() method.
method TestLogArtifact.test_log_artifact_no_session 203 Test log_artifact with no session does nothing.
method TestLogArtifact.test_log_artifact_basic 209 Test log_artifact basic.
method TestLogArtifact.test_log_artifact_with_line_count 216 Test log_artifact with line count.
method TestLogArtifact.test_log_artifact_with_summary 222 Test log_artifact with summary.
class TestLogChoice 232 Test log_choice() method.
method TestLogChoice.test_log_choice_no_session 235 Test log_choice with no session does nothing.
method TestLogChoice.test_log_choice_basic 241 Test log_choice basic.
class TestLogAchievement 253 Test log_achievement() method.
method TestLogAchievement.test_log_achievement_no_session 256 Test log_achievement with no session does nothing.
method TestLogAchievement.test_log_achievement_basic 262 Test log_achievement basic.
class TestSetHandoff 272 Test set_handoff() method.
method TestSetHandoff.test_set_handoff_no_session 275 Test set_handoff with no session does nothing.
method TestSetHandoff.test_set_handoff_basic 281 Test set_handoff basic.
method TestSetHandoff.test_set_handoff_all_fields 292 Test set_handoff with all fields.
class TestResume 314 Test resume() method.
method TestResume.test_resume_no_session 317 Test resume when no sessions exist.
method TestResume.test_resume_latest 322 Test resume gets latest session.
method TestResume.test_resume_by_seq 330 Test resume by sequence number.
method TestResume.test_resume_sets_active 343 Test resume sets _active.
class TestGetSession 354 Test get_session() method.
method TestGetSession.test_get_session_not_found 357 Test get_session when not found.
method TestGetSession.test_get_session_found 362 Test get_session when found.
class TestAllSessions 373 Test all_sessions() method.
method TestAllSessions.test_all_sessions_empty 376 Test all_sessions when empty.
method TestAllSessions.test_all_sessions_with_data 381 Test all_sessions with data.
class TestSessionCount 390 Test session_count() method.
method TestSessionCount.test_session_count_zero 393 Test session_count when zero.
method TestSessionCount.test_session_count_with_sessions 398 Test session_count with sessions.
class TestSessionControllerIntegration 407 Integration tests for SessionController.
method TestSessionControllerIntegration.test_full_workflow 410 Test complete session workflow.
method TestSessionControllerIntegration.test_multiple_sessions 447 Test multiple sessions.
method TestSessionControllerIntegration.test_resume_workflow 471 Test resume workflow.
method TestSessionControllerIntegration.test_roundtrip_preservation 493 Test data survives save/load cycle.
class TestCheckGitClean 530 Test _check_git_clean with real git repos.
method TestCheckGitClean.test_clean_repo 533 Clean repo returns True.
method TestCheckGitClean.test_dirty_repo 557 Dirty repo (modified tracked file) returns False.
method TestCheckGitClean.test_untracked_only_is_clean 583 Repo with only untracked files returns True.
method TestCheckGitClean.test_non_git_dir 609 Non-git directory returns True (no git errors).
class TestCreateSessionTag 616 Test _create_session_tag with real git repos.
method TestCreateSessionTag.test_creates_tag 619 Creates annotated git tag for session.
class TestPushSessionTag 656 Test _push_session_tag with no remote.
method TestPushSessionTag.test_push_no_remote_returns_false 659 Push returns False when no remote configured.
class TestCategoryPrefixes 687 Test _categorize_achievements with category prefix matching.
method TestCategoryPrefixes.test_added_category 690 Achievements starting with 'add' go to Added.
method TestCategoryPrefixes.test_fixed_category 701 Achievements starting with 'fix' go to Fixed.
method TestCategoryPrefixes.test_removed_category 712 Achievements starting with 'remove' go to Removed.
method TestCategoryPrefixes.test_default_changed_category 722 Unmatched achievements go to Changed.