test updates to take into account exception management

This commit is contained in:
2025-09-27 13:47:36 +02:00
parent 3e720212d9
commit 6b9817f179
38 changed files with 2951 additions and 871 deletions

View File

@@ -103,7 +103,8 @@ class PriceProcessor:
"""
Parse price string into (price, currency) tuple.
Returns (None, None) if parsing fails
Raises ValueError if parsing fails for non-empty input.
Returns (None, None) for empty/null input.
"""
if not price_str or pd.isna(price_str):
return None, None
@@ -136,5 +137,6 @@ class PriceProcessor:
except ValueError:
pass
logger.warning(f"Could not parse price: '{price_str}'")
return price_str, None
# If we get here, parsing failed completely
logger.error(f"Could not parse price: '{price_str}'")
raise ValueError(f"Invalid price format: '{price_str}'")