mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-02-19 02:40:58 +00:00
Merge branch 'develop' into feature/fetch-public-trades
This commit is contained in:
@@ -83,7 +83,7 @@ def test_datahandler_ohlcv_regex(filename, pair, timeframe, candletype):
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"input,expected",
|
||||
"pair,expected",
|
||||
[
|
||||
("XMR_USDT", "XMR/USDT"),
|
||||
("BTC_USDT", "BTC/USDT"),
|
||||
@@ -95,8 +95,8 @@ def test_datahandler_ohlcv_regex(filename, pair, timeframe, candletype):
|
||||
("UNITTEST_USDT", "UNITTEST/USDT"),
|
||||
],
|
||||
)
|
||||
def test_rebuild_pair_from_filename(input, expected):
|
||||
assert IDataHandler.rebuild_pair_from_filename(input) == expected
|
||||
def test_rebuild_pair_from_filename(pair, expected):
|
||||
assert IDataHandler.rebuild_pair_from_filename(pair) == expected
|
||||
|
||||
|
||||
def test_datahandler_ohlcv_get_available_data(testdatadir):
|
||||
|
||||
@@ -286,7 +286,7 @@ def test_refresh(mocker, default_conf):
|
||||
refresh_mock = mocker.patch(f"{EXMS}.refresh_latest_ohlcv")
|
||||
mock_refresh_trades = mocker.patch(f"{EXMS}.refresh_latest_trades")
|
||||
|
||||
exchange = get_patched_exchange(mocker, default_conf, id="binance")
|
||||
exchange = get_patched_exchange(mocker, default_conf, exchange="binance")
|
||||
timeframe = default_conf["timeframe"]
|
||||
pairs = [("XRP/BTC", timeframe), ("UNITTEST/BTC", timeframe)]
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ def test_download_data_main_no_markets(mocker, caplog):
|
||||
"freqtrade.data.history.history_utils.refresh_backtest_ohlcv_data",
|
||||
MagicMock(return_value=["ETH/BTC", "XRP/BTC"]),
|
||||
)
|
||||
patch_exchange(mocker, id="binance")
|
||||
patch_exchange(mocker, exchange="binance")
|
||||
mocker.patch(f"{EXMS}.get_markets", return_value={})
|
||||
config = setup_utils_configuration({"exchange": "binance"}, RunMode.UTIL_EXCHANGE)
|
||||
config.update({"days": 20, "pairs": ["ETH/BTC", "XRP/BTC"], "timeframes": ["5m", "1h"]})
|
||||
@@ -91,7 +91,7 @@ def test_download_data_main_trades(mocker):
|
||||
|
||||
|
||||
def test_download_data_main_data_invalid(mocker):
|
||||
patch_exchange(mocker, id="kraken")
|
||||
patch_exchange(mocker, exchange="kraken")
|
||||
mocker.patch(f"{EXMS}.get_markets", return_value={})
|
||||
config = setup_utils_configuration({"exchange": "kraken"}, RunMode.UTIL_EXCHANGE)
|
||||
config.update(
|
||||
|
||||
@@ -154,10 +154,10 @@ def test_backtest_analysis_nomock(default_conf, mocker, caplog, testdatadir, use
|
||||
assert "-3.5" in captured.out
|
||||
assert "50" in captured.out
|
||||
assert "0" in captured.out
|
||||
assert "0.01616" in captured.out
|
||||
assert "0.016" in captured.out
|
||||
assert "34.049" in captured.out
|
||||
assert "0.104411" in captured.out
|
||||
assert "52.8292" in captured.out
|
||||
assert "0.104" in captured.out
|
||||
assert "52.829" in captured.out
|
||||
|
||||
# test group 1
|
||||
args = get_args(base_args + ["--analysis-groups", "1"])
|
||||
|
||||
@@ -555,7 +555,7 @@ def test_refresh_backtest_ohlcv_data(
|
||||
mocker.patch.object(Path, "unlink", MagicMock())
|
||||
default_conf["trading_mode"] = trademode
|
||||
|
||||
ex = get_patched_exchange(mocker, default_conf, id="bybit")
|
||||
ex = get_patched_exchange(mocker, default_conf, exchange="bybit")
|
||||
timerange = TimeRange.parse_timerange("20190101-20190102")
|
||||
refresh_backtest_ohlcv_data(
|
||||
exchange=ex,
|
||||
|
||||
@@ -17,7 +17,7 @@ def test_import_kraken_trades_from_csv(testdatadir, tmp_path, caplog, default_co
|
||||
|
||||
default_conf_usdt["exchange"]["name"] = "kraken"
|
||||
|
||||
patch_exchange(mocker, id="kraken")
|
||||
patch_exchange(mocker, exchange="kraken")
|
||||
mocker.patch(
|
||||
f"{EXMS}.markets",
|
||||
PropertyMock(
|
||||
|
||||
Reference in New Issue
Block a user