Parser factory raises value error on unknown file path 🟥

This commit is contained in:
Daniel Roth 2026-01-19 11:17:15 +00:00
parent 4d36fce83d
commit 9244689e76

View file

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