Changeset - 77393ee80fde
[Not reviewed]
0 1 0
Brett Smith - 4 years ago 2020-05-20 19:35:27
brettcsmith@brettcsmith.org
tests: Make consistent rate test a little more robust.
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
tests/test_historical.py
Show inline comments
...
 
@@ -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, "<EOF>"))
 
    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, "<EOF>")
 
        assert next(lines, "<EOF>").startswith(expected)
0 comments (0 inline, 0 general)