Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.test_utils.assertion.error module

Test utilities for `betty.assertion.error`.

betty.test_utils.assertion.error.assert_error(actual_error: AssertionFailed | AssertionFailedGroup, *, error: AssertionFailed, error_type: None = None, error_message: None = None, error_contexts: None = None) → list[AssertionFailed]
betty.test_utils.assertion.error.assert_error(actual_error: AssertionFailed | AssertionFailedGroup, *, error: None = None, error_type: type[AssertionFailed] = AssertionFailed, error_message: str | None = None, error_contexts: list[str] | None = None) → list[AssertionFailed]

  Assert that an error group contains an error matching the given parameters.

betty.test_utils.assertion.error.raises_error(*args: Any, **kwargs: Any) → Iterator[AssertionFailedGroup]

  Provide a context manager to assert that an error group contains an error matching the given parameters.