Fix test warning

This commit is contained in:
Matthias
2022-09-27 08:10:58 +00:00
parent 43e847ff2f
commit 8c2e473ee5
5 changed files with 9 additions and 9 deletions

View File

@@ -275,7 +275,7 @@ def test_create_cum_profit1(testdatadir):
filename = testdatadir / "backtest_results/backtest-result_new.json"
bt_data = load_backtest_data(filename)
# Move close-time to "off" the candle, to make sure the logic still works
bt_data.loc[:, 'close_date'] = bt_data.loc[:, 'close_date'] + DateOffset(seconds=20)
bt_data['close_date'] = bt_data.loc[:, 'close_date'] + DateOffset(seconds=20)
timerange = TimeRange.parse_timerange("20180110-20180112")
df = load_pair_history(pair="TRX/BTC", timeframe='5m',

View File

@@ -839,7 +839,7 @@ def test_backtest_trim_no_data_left(default_conf, fee, mocker, testdatadir) -> N
data = history.load_data(datadir=testdatadir, timeframe='5m', pairs=['UNITTEST/BTC'],
timerange=timerange)
df = data['UNITTEST/BTC']
df.loc[:, 'date'] = df.loc[:, 'date'] - timedelta(days=1)
df['date'] = df.loc[:, 'date'] - timedelta(days=1)
# Trimming 100 candles, so after 2nd trimming, no candle is left.
df = df.iloc[:100]
data['XRP/USDT'] = df

View File

@@ -622,10 +622,10 @@ def test_VolumePairList_range(mocker, whitelist_conf, shitcoinmarkets, tickers,
# create candles for high volume with all candles high volume, but very low price.
ohlcv_history_high_volume = ohlcv_history.copy()
ohlcv_history_high_volume.loc[:, 'volume'] = 10
ohlcv_history_high_volume.loc[:, 'low'] = ohlcv_history_high_volume.loc[:, 'low'] * 0.01
ohlcv_history_high_volume.loc[:, 'high'] = ohlcv_history_high_volume.loc[:, 'high'] * 0.01
ohlcv_history_high_volume.loc[:, 'close'] = ohlcv_history_high_volume.loc[:, 'close'] * 0.01
ohlcv_history_high_volume['volume'] = 10
ohlcv_history_high_volume['low'] = ohlcv_history_high_volume.loc[:, 'low'] * 0.01
ohlcv_history_high_volume['high'] = ohlcv_history_high_volume.loc[:, 'high'] * 0.01
ohlcv_history_high_volume['close'] = ohlcv_history_high_volume.loc[:, 'close'] * 0.01
mocker.patch('freqtrade.exchange.ftx.Ftx.market_is_tradable', return_value=True)