Improve kraken test resiliance
This commit is contained in:
parent
b9f6911a6a
commit
74e623fe5b
@ -224,6 +224,11 @@ class TestCCXTExchange():
|
|||||||
for val in [1, 2, 5, 25, 100]:
|
for val in [1, 2, 5, 25, 100]:
|
||||||
l2 = exchange.fetch_l2_order_book(pair, val)
|
l2 = exchange.fetch_l2_order_book(pair, val)
|
||||||
if not l2_limit_range or val in l2_limit_range:
|
if not l2_limit_range or val in l2_limit_range:
|
||||||
|
if val > 50:
|
||||||
|
# Orderbooks are not always this deep.
|
||||||
|
assert val - 5 < len(l2['asks']) <= val
|
||||||
|
assert val - 5 < len(l2['bids']) <= val
|
||||||
|
else:
|
||||||
assert len(l2['asks']) == val
|
assert len(l2['asks']) == val
|
||||||
assert len(l2['bids']) == val
|
assert len(l2['bids']) == val
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user