You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from pytest_check import raises
class CustomException(Exception):
pass
def test_context_manager_not_raised_1():
with raises(CustomException):
print("Custom Exception is not raised")
def test_context_manager_not_raised_2():
with raises(AssertionError):
print("Assertion Exception is not raised")
I expected these tests pass both. But both fail. E.g: The first one:
Please let me know if my understanding is right.
The text was updated successfully, but these errors were encountered:
I was looking for a way to have soft assertions, using a CustomException instead of AssertionException, but it seems this is not the intended use of raises.
Closing the issue
Reference:
In following example:
I expected these tests pass both. But both fail. E.g: The first one:
Please let me know if my understanding is right.
The text was updated successfully, but these errors were encountered: