From 9244689e76668f9a499b3e9fef3736199b089f52 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Mon, 19 Jan 2026 11:17:15 +0000 Subject: [PATCH] =?UTF-8?q?Parser=20factory=20raises=20value=20error=20on?= =?UTF-8?q?=20unknown=20file=20path=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../condition/tests/parsing/test_parsing_factory.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/backend/condition/tests/parsing/test_parsing_factory.py b/backend/condition/tests/parsing/test_parsing_factory.py index dc2949f0..4e373a12 100644 --- a/backend/condition/tests/parsing/test_parsing_factory.py +++ b/backend/condition/tests/parsing/test_parsing_factory.py @@ -1,3 +1,5 @@ +import pytest + from backend.condition.parsing.factory import select_parser def test_selects_lbwf_parser(): @@ -9,4 +11,12 @@ def test_selects_lbwf_parser(): actual_class_name = select_parser(file_path_str).__class__.__name__ # assert - assert expected_class_name == actual_class_name \ No newline at end of file + assert expected_class_name == actual_class_name + +def test_unknown_filepath_raises_value_error(): + # arrange + file_path_str = "unkown/Example Asset Data.xlsx" + + # act + assert + with pytest.raises(ValueError): + select_parser(file_path_str) \ No newline at end of file