Environment
provide.testkit.utils.environment
¶
Environment management utilities for testing.
Provides context managers and utilities for managing test environments, environment variables, and foundation setup/cleanup.
Classes¶
TestEnvironment
¶
Context manager for test environment setup with proper cleanup.
Initialize test environment manager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env_vars
|
dict[str, str] | None
|
Dictionary of environment variables to set during the test |
None
|
Source code in provide/testkit/utils/environment.py
Functions¶
__enter__
¶
Enter the test environment context.
Source code in provide/testkit/utils/environment.py
__exit__
¶
Exit the test environment context and restore original state.
Source code in provide/testkit/utils/environment.py
Functions¶
add_src_to_path
¶
Add src directory to Python path for examples. Returns project root path.
Source code in provide/testkit/utils/environment.py
get_example_dir
¶
Get the examples directory path consistently across examples.