diff --git a/tests/test_historical.py b/tests/test_historical.py index 49a81c34f55babb9fd596bd37ef42e0e576f7ded..5dac2b7a9a15558afd90b464be13f53004e973a4 100644 --- a/tests/test_historical.py +++ b/tests/test_historical.py @@ -252,10 +252,10 @@ def test_rate_consistent_as_cost_and_price(alternate_responder, any_date, output config = build_config(date=any_date, **config_kwargs) with io.StringIO() as output: lines = lines_from_run(config, output) - match = re.search(r'\{=?\d+\.\d+ USD\}', next(lines, "")) - assert match is not None + amount, _, _ = next(lines).partition('@') + expected = amount.replace('\n', ' ') future_date = any_date.replace(year=any_date.year + 1) config = build_config(date=future_date, from_date=any_date, **config_kwargs) with io.StringIO() as output: lines = lines_from_run(config, output) - assert match.group(0) in next(lines, "") + assert next(lines, "").startswith(expected)