Skip to content

Make t.fail() accept an objectΒ #2615

Open
@dolsem

Description

@dolsem

It seems like the only problem with #1094 is providing detailed error output when a custom assertion fails. Everything else is straightforward. What if t.fail() could accept an object to use for creating an AssertionError? The fields could be message, actual, expected, and format that will specifying which formatting function to use for setting the values field on the error object. Could also add an optional assertion field for a custom assertion name.

Would this be compatible with #2435?

If there's interest, I can submit a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions