Orchestrata Ultimate › Tests › Reference › session › test_session_controller_lifecycle
Tests reference — tests/session/test_session_controller_lifecycle.py
Module of tests/session, split out because the directory page would be too large.
Prose pending.
tests/session/test_session_controller_lifecycle.py
source · 30 tests · 500 lines
Tests for session.session — SessionController lifecycle methods.
Covers: session.context, session.exceptions, session.models, session.session
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestCategorizeAchievements |
109 | Tests for _categorize_achievements method. |
| method | TestCategorizeAchievements.test_added_category |
112 | Test achievements starting with 'add' go to Added. |
| method | TestCategorizeAchievements.test_fixed_category |
125 | Test achievements starting with 'fix' go to Fixed. |
| method | TestCategorizeAchievements.test_removed_category |
138 | Test achievements with remove/delete go to Removed. |
| method | TestCategorizeAchievements.test_deprecated_category |
151 | Test achievements with 'deprecate' go to Deprecated. |
| method | TestCategorizeAchievements.test_security_category |
163 | Test achievements with 'security' go to Security. |
| method | TestCategorizeAchievements.test_default_changed_category |
176 | Test unmatched achievements go to Changed. |
| method | TestCategorizeAchievements.test_empty_achievements |
189 | Test empty achievements returns empty dict. |
| method | TestCategorizeAchievements.test_strip_dash_prefix |
201 | Test that leading dashes are stripped for matching. |
| class | TestSpliceChangelog |
214 | Tests for _splice_changelog method. |
| method | TestSpliceChangelog.test_splice_into_existing_category |
217 | Test splicing entries into an existing category block. |
| method | TestSpliceChangelog.test_splice_preserves_existing_entries |
227 | Test splicing preserves existing entries. |
| method | TestSpliceChangelog.test_splice_no_duplicate |
246 | Test that duplicate entries are not added. |
| class | TestCreateSessionTag |
263 | Tests for _create_session_tag method. |
| method | TestCreateSessionTag.test_create_tag |
266 | Test creating a session tag in a git repo. |
| method | TestCreateSessionTag.test_create_tag_no_git |
286 | Test creating tag in non-git directory returns False. |
| class | TestPushSessionTag |
301 | Tests for _push_session_tag method. |
| method | TestPushSessionTag.test_push_no_remote |
304 | Test push fails gracefully when no remote exists. |
| class | TestUpdateChangelog |
316 | Tests for _update_changelog method. |
| method | TestUpdateChangelog.test_update_changelog_in_git_repo |
319 | Test full changelog update in a git repo. |
| method | TestUpdateChangelog.test_update_changelog_no_achievements |
334 | Test changelog not updated when no achievements. |
| method | TestUpdateChangelog.test_update_changelog_no_git |
345 | Test changelog update returns False when no CHANGELOG.md. |
| class | TestAutoCloseUnclosed |
355 | Tests for _auto_close_unclosed method. |
| method | TestAutoCloseUnclosed.test_auto_close_unclosed_session |
358 | Test auto-closing an unclosed session. |
| method | TestAutoCloseUnclosed.test_no_auto_close_when_clean |
372 | Test no auto-close when latest session is properly closed. |
| class | TestValidateAndEnd |
383 | Tests for validate_and_end method. |
| method | TestValidateAndEnd.test_validate_and_end_fails_empty_session |
386 | Test that validate_and_end raises ChecklistError. |
| method | TestValidateAndEnd.test_validate_and_end_no_active_session |
395 | Test that validate_and_end with no session raises. |
| class | TestSessionControllerEnd |
404 | Tests for end method — covering git tag and changelog lines. |
| method | TestSessionControllerEnd.test_end_computes_length |
407 | Test that end sets the session length. |
| method | TestSessionControllerEnd.test_end_returns_none_without_active |
419 | Test end returns None when no active session. |
| class | TestGetTestState |
427 | Tests for _get_test_state method. |
| method | TestGetTestState.test_returns_string |
430 | Test _get_test_state returns a string. |
| class | TestCheckGitClean |
436 | Tests for _check_git_clean method. |
| method | TestCheckGitClean.test_clean_non_git_dir |
439 | Test non-git directory is considered clean. |
| class | TestFindChangelog |
445 | Tests for _find_changelog method. |
| method | TestFindChangelog.test_no_changelog |
448 | Test returns None when no CHANGELOG.md exists. |
| method | TestFindChangelog.test_finds_changelog |
453 | Test finds CHANGELOG.md in git repo. |
| class | TestCommitChangelog |
460 | Tests for _commit_changelog method. |
| method | TestCommitChangelog.test_commit_changelog |
463 | Test staging and committing CHANGELOG.md. |
| class | TestSessionExceptions |
479 | Tests for session exception classes. |
| method | TestSessionExceptions.test_checklist_error |
482 | Test ChecklistError construction and attributes. |
| method | TestSessionExceptions.test_session_start_error |
492 | Test SessionStartError construction. |