From c60c4f1c2602436bec96fea1e4e02fd6e5b25d7f Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Sat, 24 Feb 2024 20:45:25 +0100 Subject: [PATCH] add UnicodeDecodeError tests for handle_exceptions --- tests/test_cli.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index b02b7c0..1307e57 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -141,7 +141,13 @@ def test_handle_validation_error(data_model_class, invalid_model): @pytest.mark.parametrize( "exception", - [ruamel.yaml.YAMLError, RuntimeError, FileNotFoundError, ValueError], + [ + ruamel.yaml.YAMLError, + RuntimeError, + FileNotFoundError, + ValueError, + UnicodeDecodeError("utf-8", b"", 1, 2, "message"), + ], ) def test_handle_exceptions(exception): @cli.handle_exceptions