8000 [Bug] pytest.raises is passing failing tests when using the 'message' parameter · Issue #3350 · pytest-dev/pytest · GitHub
[go: up one dir, main page]

Skip to content
[Bug] pytest.raises is passing failing tests when using the 'message' parameter #3350
@gcardozo123

Description

@gcardozo123

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')

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0