bundle.testing.tools.decorators¶
Submodules¶
Functions¶
|
|
|
|
|
|
|
Decorator for testing bundle Data model serialization and schema validation. |
Package Contents¶
- bundle.testing.tools.decorators.cprofile(expected_duration: int = EXPECTED_DURATION_NS, performance_threshold: int = PERFORMANCE_THRESHOLD_NS, cprofile_folder: pathlib.Path | None = None) collections.abc.Callable[[collections.abc.Callable[Ellipsis, Any]], collections.abc.Callable[Ellipsis, Any]][source]¶
- bundle.testing.tools.decorators.data(tmp_dir: pathlib.Path, ref_dir: str | pathlib.Path, cprofile_folder: str | pathlib.Path | None = None)[source]¶
Decorator for testing bundle Data model serialization and schema validation.
Wraps test functions to perform round-trip dict and JSON serialization tests, and validates the model against its JSON schema. Tests are profiled using cprofile. Results and errors are logged, with provision for updating reference data.
- Parameters:
- Returns:
- A decorator that wraps test functions to extend their functionality
with serialization and validation tests.
- Return type:
Decorator