Remove 'message' parameter from pytest.raises
This commit is contained in:
@@ -2,7 +2,6 @@ import sys
|
||||
|
||||
import pytest
|
||||
from _pytest.outcomes import Failed
|
||||
from _pytest.warning_types import PytestDeprecationWarning
|
||||
|
||||
|
||||
class TestRaises:
|
||||
@@ -155,17 +154,6 @@ class TestRaises:
|
||||
else:
|
||||
assert False, "Expected pytest.raises.Exception"
|
||||
|
||||
def test_custom_raise_message(self):
|
||||
message = "TEST_MESSAGE"
|
||||
try:
|
||||
with pytest.warns(PytestDeprecationWarning):
|
||||
with pytest.raises(ValueError, message=message):
|
||||
pass
|
||||
except pytest.raises.Exception as e:
|
||||
assert e.msg == message
|
||||
else:
|
||||
assert False, "Expected pytest.raises.Exception"
|
||||
|
||||
@pytest.mark.parametrize("method", ["function", "with"])
|
||||
def test_raises_cyclic_reference(self, method):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user