Skip to content

Add .try_assert() for a panic-free version of .assert() #196

@gibfahn

Description

@gibfahn

The test suite I'm working with uses file locks on destructors to ensure things run synchronously. Having tests panic breaks that (unless we catch panics). Easiest way is to use all the .try_*() methods like .try_success() and .try_stderr().

However as far as I can tell there isn't a Result-returning way to do .assert(), which can panic, so filing this issue to ask whether we could have that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions