Merge branch 'wohlgemuth' into nullartHFT

This commit is contained in:
Gert Wohlgemuth
2018-06-18 13:19:40 -07:00
committed by GitHub
14 changed files with 72 additions and 35 deletions

View File

@@ -520,7 +520,6 @@ def test_get_order(default_conf, mocker):
order = MagicMock()
order.myid = 123
exchange._DRY_RUN_OPEN_ORDERS['X'] = order
print(exchange.get_order('X', 'TKN/BTC'))
assert exchange.get_order('X', 'TKN/BTC').myid == 123
default_conf['dry_run'] = False

View File

@@ -9,6 +9,7 @@ from unittest.mock import MagicMock
import numpy as np
import pandas as pd
import pytest
from arrow import Arrow
from freqtrade import optimize
@@ -373,6 +374,7 @@ def test_generate_text_table(default_conf, mocker):
assert backtesting._generate_text_table(data={'ETH/BTC': {}}, results=results) == result_str
@pytest.mark.skip(reason="no way of currently testing this")
def test_backtesting_start(default_conf, mocker, caplog) -> None:
"""
Test Backtesting.start() method
@@ -594,7 +596,6 @@ def test_backtest_record(default_conf, fee, mocker):
results = backtesting.backtest(backtest_conf)
assert len(results) == 3
# Assert file_dump_json was only called once
print(names)
assert names == ['backtest-result.json']
records = records[0]
# Ensure records are of correct type
@@ -615,6 +616,7 @@ def test_backtest_record(default_conf, fee, mocker):
assert dur > 0
@pytest.mark.skip(reason="no way of currently testing this")
def test_backtest_start_live(default_conf, mocker, caplog):
conf = deepcopy(default_conf)
conf['exchange']['pair_whitelist'] = ['UNITTEST/BTC']

View File

@@ -63,7 +63,6 @@ def test_scripts_options() -> None:
arguments = Arguments(['-p', 'ETH/BTC'], '')
arguments.scripts_options()
args = arguments.get_parsed_arg()
print(args.pair)
assert args.pair == 'ETH/BTC'

View File

@@ -16,7 +16,7 @@ def load_dataframe_pair(pairs):
dataframe = ld[pairs[0]]
analyze = Analyze({'strategy': 'DefaultStrategy'})
dataframe = analyze.analyze_ticker(dataframe)
dataframe = analyze.analyze_ticker(dataframe, pairs[0])
return dataframe