This commit is contained in:
Gilles Soulier
2026-01-14 21:54:55 +01:00
parent c91c0f1fc9
commit d0b73b9319
140 changed files with 5822 additions and 161 deletions

View File

View File

@@ -0,0 +1,29 @@
"""
Tests pour le parsing de prix avec separateurs de milliers.
"""
from pricewatch.app.stores.price_parser import parse_price_text
def test_parse_price_with_thousands_space():
assert parse_price_text("1 259,00") == 1259.00
def test_parse_price_with_narrow_nbsp():
assert parse_price_text("1\u202f259,00") == 1259.00
def test_parse_price_with_dot_thousands():
assert parse_price_text("1.259,00") == 1259.00
def test_parse_price_with_comma_thousands():
assert parse_price_text("1,259.00") == 1259.00
def test_parse_price_without_decimal():
assert parse_price_text("1259") == 1259.00
def test_parse_price_with_currency():
assert parse_price_text("EUR 1 259,00") == 1259.00