codex2
This commit is contained in:
0
tests/stores/__pycache__/test_amazon.cpython-313-pytest-9.0.2.pyc
Executable file → Normal file
0
tests/stores/__pycache__/test_amazon.cpython-313-pytest-9.0.2.pyc
Executable file → Normal file
Binary file not shown.
29
tests/stores/test_price_parser.py
Normal file
29
tests/stores/test_price_parser.py
Normal 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
|
||||
Reference in New Issue
Block a user