put shared fixtures to conftest.py
This commit is contained in:
parent
3d42b9fd75
commit
fbbde9de25
18
freqtrade/tests/conftest.py
Normal file
18
freqtrade/tests/conftest.py
Normal file
@ -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
|
||||
}
|
@ -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': ''})
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user