mirror of https://github.com/eyhc1/rendercv.git
fix test_handle_exceptions
This commit is contained in:
parent
dfcb542f3e
commit
957628196b
|
@ -142,17 +142,17 @@ def test_handle_validation_error(data_model_class, invalid_model):
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"exception",
|
"exception",
|
||||||
[
|
[
|
||||||
ruamel.yaml.YAMLError,
|
ruamel.yaml.YAMLError("message"),
|
||||||
RuntimeError,
|
RuntimeError("message"),
|
||||||
FileNotFoundError,
|
FileNotFoundError("message"),
|
||||||
ValueError,
|
ValueError("message"),
|
||||||
UnicodeDecodeError("utf-8", b"", 1, 2, "message"),
|
UnicodeDecodeError("utf-8", b"", 1, 2, "message"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_handle_exceptions(exception):
|
def test_handle_exceptions(exception):
|
||||||
@cli.handle_exceptions
|
@cli.handle_exceptions
|
||||||
def function_that_raises_exception():
|
def function_that_raises_exception():
|
||||||
raise exception("This is an exception!")
|
raise exception
|
||||||
|
|
||||||
function_that_raises_exception()
|
function_that_raises_exception()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue