Skip to content

Commit 01a6cdf

Browse files
Ruida ZengRuida Zeng
authored andcommitted
fixed tests
1 parent 3b7e6ee commit 01a6cdf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_detector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_get_best_opportunity_returns_correct_triplet_with_multiple_tickers():
6565
]
6666
best_opportunity, best_profit = get_best_triangular_opportunity(tickers)
6767
assert len(best_opportunity) == 3
68-
assert best_profit == 5.526315789473684
68+
assert round(best_profit, 3) == 5.526 # 5.526315789473684
6969
assert all(isinstance(ticker, ShortTicker) for ticker in best_opportunity)
7070

7171
def test_get_best_opportunity_returns_correct_cycle_with_correct_tickers():
@@ -94,5 +94,5 @@ def test_get_best_opportunity_returns_correct_cycle_with_multiple_tickers():
9494
]
9595
best_opportunity, best_profit = get_best_opportunity(tickers)
9696
assert len(best_opportunity) >= 3 # Handling cycles with more than 3 tickers
97-
assert best_profit == 5.775
97+
assert round(best_profit, 3) == 5.775
9898
assert all(isinstance(ticker, ShortTicker) for ticker in best_opportunity)

0 commit comments

Comments
 (0)