+
Skip to content

Document & test: custom error message for check.raises #143

@jessie-github

Description

@jessie-github

Hello,

I wanted to use check.raises(AssertionError, message = "this is a custom message"), like how I used pytest.raises(AssertionError, message = "this is a custom message") but then I realized that it was deprecated in pytest:
https://docs.pytest.org/en/latest/deprecations.html#raises-message-deprecated

There is a workaround for pytest (using pytest.fail) but I don't think this is usable with pytest-check.

Is there a way for me to customize the error message with check.raises ?

Really useful nice project btw, thanks a lot

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载