add UnicodeDecodeError tests for handle_exceptions

This commit is contained in:
Sina Atalay 2024-02-24 20:45:25 +01:00
parent 00054763fc
commit c60c4f1c26
1 changed files with 7 additions and 1 deletions

View File

@ -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