Skip to content

Add scenario for pytest.raises() with pytest.fail() in context manager #210

@jamescooke

Description

@jamescooke

As per Pytest deprecations documentation, message= is deprecated. That all seems fine 👍🏻

However, the suggested solution packs a pytest.fail() into the context manager:

with pytest.raises(TimeoutError):
    wait_for(websocket.recv(), 0.5)
    pytest.fail("Client got unexpected message")

At the very least this needs a new "good" example to be added to ensure that it works with AAA.

However, my guess is that we might need some fixes / adjustment for default or greedy act blocks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions