uvicorn icon indicating copy to clipboard operation
uvicorn copied to clipboard

Test assertions are broken in websocket server tests

Open stefanw opened this issue 5 years ago • 2 comments

This PR is showing that assertion failures in the server part of websocket tests do not affect the test outcomes.

stefanw avatar Aug 18 '20 11:08 stefanw

Oh, fun!

lovelydinosaur avatar Aug 18 '20 12:08 lovelydinosaur

Yeah I wasn't even aware of this, after some digging this exists : https://github.com/bjoluc/pytest-reraise

should we use this ?

euri10 avatar Aug 20 '20 14:08 euri10

I've checked this. Yes, it's weird. The thing is that we do assertions outside the thread, so I'd say this is fine, as the pytest.raises we have there are a way of not printing the exceptions (and only that...).

Kludex avatar Sep 11 '22 13:09 Kludex