pytest_jsonschema_snapshot.plugin¶
Functions¶
|
Adds --schema-update option to pytest. |
|
Fixture providing a SchemaShot instance and gathering used schemas. |
|
Hook that runs after all tests have finished. |
|
Adds a summary about schemas to the final pytest report in the terminal. |
|
Deletes unused schemas in update mode and collects statistics. |
Module Contents¶
- schemashot(
- request: pytest.FixtureRequest,
Fixture providing a SchemaShot instance and gathering used schemas.
- pytest_unconfigure(config: pytest.Config) None [source]¶
Hook that runs after all tests have finished. Clears global variables.
- pytest_terminal_summary(
- terminalreporter: pytest.TerminalReporter,
- exitstatus: int,
Adds a summary about schemas to the final pytest report in the terminal.
- cleanup_unused_schemas(
- manager: SchemaShot,
- update_mode: bool,
- actions: dict[str, bool],
- stats: SchemaStats | None = None,
Deletes unused schemas in update mode and collects statistics. Additionally, deletes the pair file <name>.json if it exists.
- Parameters:
manager – SchemaShot instance
update_mode – Update mode
stats – Optional object for collecting statistics