8000 add support for custom error messages on failure · Issue #35 · assertpy/assertpy · GitHub
[go: up one dir, main page]

Skip to content

add support for custom error messages on failure #35

@jasoncorbett

Description

@jasoncorbett

In order to have a better context in the stack trace, it would be helpful if you could provide a name property to the value to handle assertions better. For example:

assert_that(1 + 2).named('the result of 1 + 2').is_equal_to(4)

will raise error message:

Expected [the result of 1 + 2] <3> to be equal to <4>, but was not.

or maybe:

Expected [the result of 1 + 2] to be equal to <4>, but it was <3>.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0