Add errorsupression to safe wrapper

This commit is contained in:
Matthias
2020-06-14 07:15:24 +02:00
parent bc821c7c20
commit c047e48a47
2 changed files with 8 additions and 3 deletions

View File

@@ -448,6 +448,11 @@ def test_strategy_safe_wrapper_error(caplog, error):
assert isinstance(ret, bool)
assert ret
caplog.clear()
# Test supressing error
ret = strategy_safe_wrapper(failing_method, message='DeadBeef', supress_error=True)()
assert log_has_re(r'DeadBeef.*', caplog)
@pytest.mark.parametrize('value', [
1, 22, 55, True, False, {'a': 1, 'b': '112'},