Add scenario for pytest.raises() with pytest.fail() in context manager
jamescooke opened this issue ยท 0 comments
jamescooke commented
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.