Files
scrap/tests/stores/test_price_parser.py
Gilles Soulier d0b73b9319 codex2
2026-01-14 21:54:55 +01:00

30 lines
708 B
Python

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