don't print in tests

This commit is contained in:
Matthias 2019-09-08 19:47:16 +02:00
parent c5726e88e8
commit 3430850421
8 changed files with 0 additions and 16 deletions

View File

@ -155,8 +155,6 @@ def test_edge_results(edge_conf, mocker, caplog, data) -> None:
trades = edge._find_trades_for_stoploss_range(frame, 'TEST/BTC', [data.stop_loss])
results = edge._fill_calculable_fields(DataFrame(trades)) if trades else DataFrame()
print(results)
assert len(trades) == len(data.trades)
if not results.empty:

View File

@ -1035,7 +1035,6 @@ def test_get_historic_ohlcv(default_conf, mocker, caplog, exchange_name):
exchange._async_get_candle_history = Mock(wraps=mock_candle_hist)
# one_call calculation * 1.8 should do 2 calls
since = 5 * 60 * 500 * 1.8
print(f"since = {since}")
ret = exchange.get_historic_ohlcv(pair, "5m", int((arrow.utcnow().timestamp - since) * 1000))
assert exchange._async_get_candle_history.call_count == 2
@ -1340,7 +1339,6 @@ def test_get_order(default_conf, mocker, exchange_name):
order.myid = 123
exchange = get_patched_exchange(mocker, default_conf, id=exchange_name)
exchange._dry_run_open_orders['X'] = order
print(exchange.get_order('X', 'TKN/BTC'))
assert exchange.get_order('X', 'TKN/BTC').myid == 123
with pytest.raises(InvalidOrderException, match=r'Tried to get an invalid dry-run-order.*'):

View File

@ -308,7 +308,6 @@ def test_backtest_results(default_conf, fee, mocker, caplog, data) -> None:
'end_date': max_date,
}
)
print(results.T)
assert len(results) == len(data.trades)
assert round(results["profit_percent"].sum(), 3) == round(data.profit_perc, 3)

View File

@ -451,7 +451,6 @@ def test_generate_text_table_strategyn(default_conf, mocker):
'| LTC/BTC | 3 | 30.00 | 90.00 '
'| 1.30000000 | 45.00 | 0:20:00 | 3 | 0 |'
)
print(backtesting._generate_text_table_strategy(all_results=results))
assert backtesting._generate_text_table_strategy(all_results=results) == result_str

View File

@ -214,9 +214,6 @@ def test_start(mocker, default_conf, caplog) -> None:
args = get_args(args)
start_hyperopt(args)
import pprint
pprint.pprint(caplog.record_tuples)
assert log_has('Starting freqtrade in Hyperopt mode', caplog)
assert start_mock.call_count == 1
@ -239,9 +236,6 @@ def test_start_no_data(mocker, default_conf, caplog) -> None:
args = get_args(args)
start_hyperopt(args)
import pprint
pprint.pprint(caplog.record_tuples)
assert log_has('No data found. Terminating.', caplog)

View File

@ -27,7 +27,6 @@ from tests.conftest import (log_has, log_has_re,
@pytest.fixture(scope="function")
def all_conf():
config_file = Path(__file__).parents[1] / "config_full.json.example"
print(config_file)
conf = load_config_file(str(config_file))
return conf
@ -713,7 +712,6 @@ def test_load_config_test_comments() -> None:
Load config with comments
"""
config_file = Path(__file__).parents[0] / "config_test_comments.json"
print(config_file)
conf = load_config_file(str(config_file))
assert conf

View File

@ -970,7 +970,6 @@ def test_execute_buy(mocker, default_conf, fee, markets, limit_buy_order) -> Non
markets=PropertyMock(return_value=markets)
)
pair = 'ETH/BTC'
print(buy_mm.call_args_list)
assert freqtrade.execute_buy(pair, stake_amount)
assert get_bid.call_count == 1

View File

@ -729,7 +729,6 @@ def test_to_json(default_conf, fee):
)
result = trade.to_json()
assert isinstance(result, dict)
print(result)
assert result == {'trade_id': None,
'pair': 'ETH/BTC',