Orchestrata Ultimate › Tests › Reference › session › test_portfolio_coverage
Tests reference — tests/session/test_portfolio_coverage.py
Module of tests/session, split out because the directory page would be too large.
Prose pending.
tests/session/test_portfolio_coverage.py
source · 33 tests · 281 lines
Coverage tests for session.portfolio — PortfolioController.
Covers: session.portfolio
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestInitializeAndLoad |
39 | Test portfolio initialization and loading. |
| method | TestInitializeAndLoad.test_file_not_exists |
42 | Test file_exists returns False initially. |
| method | TestInitializeAndLoad.test_initialize_creates_file |
46 | Test initialize creates portfolio file. |
| method | TestInitializeAndLoad.test_initialize_with_summary |
51 | Test initialize with summary. |
| method | TestInitializeAndLoad.test_load |
57 | Test loading portfolio from file. |
| method | TestInitializeAndLoad.test_load_nonexistent_raises |
63 | Test loading non-existent portfolio raises. |
| method | TestInitializeAndLoad.test_json_file_valid |
68 | Test the written file is valid JSON. |
| class | TestProjectOperations |
79 | Test project CRUD within portfolio. |
| method | TestProjectOperations.test_add_project |
82 | Test adding a project. |
| method | TestProjectOperations.test_add_project_with_summary |
88 | Test adding project with summary. |
| method | TestProjectOperations.test_list_projects |
93 | Test listing all projects. |
| method | TestProjectOperations.test_get_project |
100 | Test getting project by name. |
| method | TestProjectOperations.test_get_project_not_found |
107 | Test getting non-existent project returns None. |
| method | TestProjectOperations.test_remove_project |
111 | Test removing a project. |
| method | TestProjectOperations.test_remove_nonexistent_project |
117 | Test removing non-existent project returns False. |
| class | TestSessionOperations |
125 | Test portfolio session management. |
| method | TestSessionOperations.test_begin_session |
128 | Test starting a portfolio session. |
| method | TestSessionOperations.test_begin_multiple_sessions |
135 | Test sequential session numbering. |
| method | TestSessionOperations.test_get_session |
142 | Test getting session by number. |
| method | TestSessionOperations.test_get_session_not_found |
149 | Test getting non-existent session returns None. |
| method | TestSessionOperations.test_get_latest_session |
153 | Test getting latest session. |
| method | TestSessionOperations.test_get_latest_session_empty |
161 | Test getting latest session when empty. |
| method | TestSessionOperations.test_link_project_session |
165 | Test linking a project session to portfolio session. |
| method | TestSessionOperations.test_link_nonexistent_session |
178 | Test linking to non-existent session returns False. |
| method | TestSessionOperations.test_begin_session_custom_model |
183 | Test session with custom AI model. |
| class | TestWorkItems |
192 | Test portfolio work item management. |
| method | TestWorkItems.test_add_work |
195 | Test adding a work item. |
| method | TestWorkItems.test_add_work_with_priority |
200 | Test adding work item with priority. |
| method | TestWorkItems.test_pending_work |
205 | Test getting pending work items. |
| method | TestWorkItems.test_complete_work |
212 | Test completing a work item. |
| method | TestWorkItems.test_complete_nonexistent_work |
219 | Test completing non-existent work returns False. |
| class | TestStateOperations |
227 | Test portfolio state management. |
| method | TestStateOperations.test_get_state |
230 | Test getting portfolio state. |
| method | TestStateOperations.test_update_state |
235 | Test updating state fields. |
| method | TestStateOperations.test_update_state_sets_modified |
240 | Test update_state updates modified_at. |
| method | TestStateOperations.test_update_state_ignores_unknown |
246 | Test update_state ignores unknown fields. |
| class | TestReport |
257 | Test portfolio report generation. |
| method | TestReport.test_report_empty |
260 | Test report for empty portfolio. |
| method | TestReport.test_report_with_data |
268 | Test report with projects, sessions, and work. |