From f1b890954a70c2d0ad8722d6f5e94fe473235819 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 7 Apr 2025 19:13:47 +0200 Subject: [PATCH] test: enable total_profit_ratio asserts --- tests/persistence/test_persistence.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/persistence/test_persistence.py b/tests/persistence/test_persistence.py index a75f9aaca..d07bd7192 100644 --- a/tests/persistence/test_persistence.py +++ b/tests/persistence/test_persistence.py @@ -1183,7 +1183,7 @@ def test_calc_profit( assert pytest.approx(val) == profit_res.profit_abs assert pytest.approx(profit_res.total_profit) == round(profit, 8) - # assert pytest.approx(profit_res.total_profit_ratio) == round(profit_ratio, 8) + assert pytest.approx(profit_res.total_profit_ratio) == round(profit_ratio, 8) assert pytest.approx(trade.calc_profit(rate=close_rate)) == round(profit, 8) assert pytest.approx(trade.calc_profit_ratio(rate=close_rate)) == round(profit_ratio, 8) @@ -1193,7 +1193,7 @@ def test_calc_profit( assert pytest.approx(profit_res2.profit_ratio) == round(profit_ratio, 8) assert pytest.approx(profit_res2.total_profit) == round(profit, 8) - # assert pytest.approx(profit_res2.total_profit_ratio) == round(profit_ratio, 8) + assert pytest.approx(profit_res2.total_profit_ratio) == round(profit_ratio, 8) assert pytest.approx(trade.calc_profit(close_rate, trade.amount, trade.open_rate)) == round( profit, 8