From 957628196b6c6d5ded8fd19371e204af310813bd Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Sat, 24 Feb 2024 20:48:34 +0100 Subject: [PATCH] fix test_handle_exceptions --- tests/test_cli.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 1307e57..0722f83 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -142,17 +142,17 @@ def test_handle_validation_error(data_model_class, invalid_model): @pytest.mark.parametrize( "exception", [ - ruamel.yaml.YAMLError, - RuntimeError, - FileNotFoundError, - ValueError, + ruamel.yaml.YAMLError("message"), + RuntimeError("message"), + FileNotFoundError("message"), + ValueError("message"), UnicodeDecodeError("utf-8", b"", 1, 2, "message"), ], ) def test_handle_exceptions(exception): @cli.handle_exceptions def function_that_raises_exception(): - raise exception("This is an exception!") + raise exception function_that_raises_exception()