diff --git a/freqtrade/tests/conftest.py b/freqtrade/tests/conftest.py new file mode 100644 index 000000000..5da31413a --- /dev/null +++ b/freqtrade/tests/conftest.py @@ -0,0 +1,18 @@ +import pytest + +@pytest.fixture(scope="module") +def pairs(): + return ['btc-neo', 'btc-eth', 'btc-omg', 'btc-edg', 'btc-pay', + 'btc-pivx', 'btc-qtum', 'btc-mtl', 'btc-etc', 'btc-ltc'] + +@pytest.fixture(scope="module") +def conf(): + return { + "minimal_roi": { + "40": 0.0, + "30": 0.01, + "20": 0.02, + "0": 0.04 + }, + "stoploss": -0.05 + } diff --git a/freqtrade/tests/test_backtesting.py b/freqtrade/tests/test_backtesting.py index fc7c699d6..7eb8fd981 100644 --- a/freqtrade/tests/test_backtesting.py +++ b/freqtrade/tests/test_backtesting.py @@ -26,25 +26,6 @@ def print_pair_results(pair, results): print(format_results(results[results.currency == pair])) -@pytest.fixture -def pairs(): - return ['btc-neo', 'btc-eth', 'btc-omg', 'btc-edg', 'btc-pay', - 'btc-pivx', 'btc-qtum', 'btc-mtl', 'btc-etc', 'btc-ltc'] - - -@pytest.fixture -def conf(): - return { - "minimal_roi": { - "50": 0.0, - "40": 0.01, - "30": 0.02, - "0": 0.045 - }, - "stoploss": -0.40 - } - - def backtest(conf, pairs, mocker): trades = [] exchange._API = Bittrex({'key': '', 'secret': ''}) diff --git a/freqtrade/tests/test_hyperopt.py b/freqtrade/tests/test_hyperopt.py index 5a8143269..1660ed8a2 100644 --- a/freqtrade/tests/test_hyperopt.py +++ b/freqtrade/tests/test_hyperopt.py @@ -18,25 +18,6 @@ logging.disable(logging.DEBUG) # disable debug logs that slow backtesting a lot TARGET_TRADES = 1200 -@pytest.fixture -def pairs(): - return ['btc-neo', 'btc-eth', 'btc-omg', 'btc-edg', 'btc-pay', - 'btc-pivx', 'btc-qtum', 'btc-mtl', 'btc-etc', 'btc-ltc'] - - -@pytest.fixture -def conf(): - return { - "minimal_roi": { - "40": 0.0, - "30": 0.01, - "20": 0.02, - "0": 0.04 - }, - "stoploss": -0.05 - } - - def buy_strategy_generator(params): print(params)