Testing with Overrides¶
Monkay’s context managers make tests isolated and deterministic.
Common Patterns¶
with_instance(...)for per-test runtime injection.with_settings(...)for temporary settings.with_extensions(...)for controlled extension sets.with_full_overwrite(...)for end-to-end environment overrides.
Recommended Test Sequence¶
- Arrange with a temporary override context.
- Trigger
evaluate_settings()/apply_extensions()explicitly. - Assert behavior.
- Exit context and assert original state is restored.