From 8958f569aa25b5f03212d56c351dec5063602fc1 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 5 Jan 2022 20:37:15 +0100 Subject: [PATCH] Fix random funding_rate test failure --- tests/exchange/test_ccxt_compat.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/exchange/test_ccxt_compat.py b/tests/exchange/test_ccxt_compat.py index fff565152..08825274d 100644 --- a/tests/exchange/test_ccxt_compat.py +++ b/tests/exchange/test_ccxt_compat.py @@ -226,8 +226,12 @@ class TestCCXTExchange(): # Test For last 4 hours # Avoids random test-failure when funding-fees are 0 for a few hours. assert val0 != 0.0 or val1 != 0.0 or val2 != 0.0 or val3 != 0.0 - assert rate['open'].max() != 0.0 - assert rate['open'].min() != rate['open'].max() + # We expect funding rates to be different from 0.0 - or moving around. + assert ( + rate['open'].max() != 0.0 or rate['open'].min() != 0.0 or + (rate['open'].min() != rate['open'].max()) + ) + def test_ccxt_fetch_mark_price_history(self, exchange_futures): exchange, exchangename = exchange_futures