Orchestrata Ultimate › Tests › Reference › session › test_hook_registry_coverage
Tests reference — tests/session/test_hook_registry_coverage.py
Module of tests/session, split out because the directory page would be too large.
Prose pending.
tests/session/test_hook_registry_coverage.py
source · 28 tests · 324 lines
Coverage tests for session.hook_registry — HookRegistry.
Covers: session.hook_registry
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestHookPoints |
20 | Test HOOK_POINTS constant. |
| method | TestHookPoints.test_contains_expected_points |
23 | Test all expected hook points are defined. |
| method | TestHookPoints.test_is_frozenset |
29 | Test HOOK_POINTS is immutable. |
| class | TestHookRegistryInit |
37 | Test HookRegistry initialization. |
| method | TestHookRegistryInit.test_empty_registry |
40 | Test new registry has no hooks. |
| method | TestHookRegistryInit.test_all_points_registered |
46 | Test all hook points are present in internal dict. |
| class | TestAdd |
56 | Test hook registration. |
| method | TestAdd.test_add_hook |
59 | Test adding a hook to a valid point. |
| method | TestAdd.test_add_multiple_hooks |
70 | Test adding multiple hooks to same point. |
| method | TestAdd.test_add_hook_invalid_point |
81 | Test adding hook to invalid point raises ValueError. |
| method | TestAdd.test_add_lambda |
90 | Test adding lambda as hook. |
| class | TestRemove |
103 | Test hook removal. |
| method | TestRemove.test_remove_hook |
106 | Test removing an existing hook. |
| method | TestRemove.test_remove_nonexistent_hook |
117 | Test removing non-existent hook returns False. |
| method | TestRemove.test_remove_invalid_point |
126 | Test removing from invalid point raises ValueError. |
| method | TestRemove.test_remove_same_hook_twice |
135 | Test removing same hook twice returns False second time. |
| class | TestFire |
149 | Test hook firing. |
| method | TestFire.test_fire_single_hook |
152 | Test firing a single hook. |
| method | TestFire.test_fire_multiple_hooks |
164 | Test firing multiple hooks in order. |
| method | TestFire.test_fire_passes_kwargs |
180 | Test kwargs are forwarded to hooks. |
| method | TestFire.test_fire_no_hooks |
198 | Test firing with no hooks does not raise. |
| method | TestFire.test_fire_invalid_point |
203 | Test firing invalid point raises ValueError. |
| method | TestFire.test_fire_continues_after_error |
209 | Test hook error does not stop subsequent hooks. |
| class | TestCount |
229 | Test hook counting. |
| method | TestCount.test_count_empty |
232 | Test count returns 0 for empty point. |
| method | TestCount.test_count_after_add |
237 | Test count increases after add. |
| method | TestCount.test_count_invalid_point |
246 | Test count raises for invalid point. |
| class | TestClear |
256 | Test hook clearing. |
| method | TestClear.test_clear_specific_point |
259 | Test clearing a specific hook point. |
| method | TestClear.test_clear_all_points |
274 | Test clearing all hook points. |
| method | TestClear.test_clear_invalid_point |
283 | Test clearing invalid point raises ValueError. |
| method | TestClear.test_clear_already_empty |
289 | Test clearing empty point does not raise. |
| class | TestSessionHookProtocol |
299 | Test SessionHook protocol compliance. |
| method | TestSessionHookProtocol.test_function_satisfies_protocol |
302 | Test regular function satisfies SessionHook. |
| method | TestSessionHookProtocol.test_lambda_satisfies_protocol |
309 | Test lambda satisfies SessionHook. |
| method | TestSessionHookProtocol.test_callable_class_satisfies_protocol |
317 | Test callable class satisfies SessionHook. |