Remove isClose from tests in favor of pytest.approx

This commit is contained in:
Matthias
2022-08-31 08:18:28 +00:00
parent 10e0d53860
commit 4aec2db14d
5 changed files with 30 additions and 37 deletions

View File

@@ -1,5 +1,3 @@
from math import isclose
import pytest
from freqtrade.leverage import interest
@@ -30,9 +28,9 @@ twentyfive_hours = FtPrecise(25.0)
def test_interest(exchange, interest_rate, hours, expected):
borrowed = FtPrecise(60.0)
assert isclose(interest(
assert pytest.approx(float(interest(
exchange_name=exchange,
borrowed=borrowed,
rate=FtPrecise(interest_rate),
hours=hours
), expected)
))) == expected