Skip to content

Commit 29df749

Browse files
committed
chore: improve error output
1 parent 5e64416 commit 29df749

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/exchange_online/test_ccxt_ws_compat.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def test_ccxt_watch_ohlcv(self, exchange_ws: EXCHANGE_WS_FIXTURE_TYPE, caplog, m
3535
break
3636
sleep(1)
3737

38+
caplog.set_level(logging.DEBUG)
3839
res = exch.refresh_latest_ohlcv([pair_tf])
3940
assert m_cand.call_count == 1
4041

@@ -48,8 +49,9 @@ def test_ccxt_watch_ohlcv(self, exchange_ws: EXCHANGE_WS_FIXTURE_TYPE, caplog, m
4849
assert pair_tf in exch._exchange_ws._klines_scheduled
4950
assert res[pair_tf] is not None
5051
df1 = res[pair_tf]
51-
caplog.set_level(logging.DEBUG)
52-
assert df1.iloc[-1]["date"] == curr_candle
52+
assert df1.iloc[-1]["date"] == curr_candle, (
53+
f"Expected {curr_candle}, got {df1.iloc[-1]['date']} for {pair_tf}, now: {dt_now()}"
54+
)
5355

5456
# Wait until the next candle (might be up to 1 minute).
5557
while True:

0 commit comments

Comments
 (0)