mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 00:23:07 +00:00
test: update test for calculate_market_change
This commit is contained in:
@@ -268,6 +268,14 @@ def test_calculate_market_change(testdatadir):
|
||||
assert isinstance(result, float)
|
||||
assert pytest.approx(result) == 0.01100002
|
||||
|
||||
result = calculate_market_change(data, min_date=dt_utc(2018, 1, 20))
|
||||
assert isinstance(result, float)
|
||||
assert pytest.approx(result) == 0.0375149
|
||||
|
||||
# Move min-date after the last date
|
||||
result = calculate_market_change(data, min_date=dt_utc(2018, 2, 20))
|
||||
assert pytest.approx(result) == 0.0
|
||||
|
||||
|
||||
def test_combine_dataframes_with_mean(testdatadir):
|
||||
pairs = ["ETH/BTC", "ADA/BTC"]
|
||||
|
||||
Reference in New Issue
Block a user