[Bug] pytest.raises is passing failing tests when using the 'message' parameter · Issue #3350 · pytest-dev/pytest (original) (raw)

Platform: Windows 10 64-bit
Pytest Version: 3.5.0

The test bellow passes, but it should fail and print a message saying that it was expecting expected message but got some other message.

import pytest

def test(): with pytest.raises(ZeroDivisionError, message='expected message'): raise ZeroDivisionError('some other message')