Make Pylint Happy chapter 1
This commit is contained in:
@@ -1,14 +1,8 @@
|
||||
# pragma pylint: disable=missing-docstring,W0212,C0103
|
||||
import logging
|
||||
import os
|
||||
import pytest
|
||||
from copy import deepcopy
|
||||
|
||||
#from freqtrade.optimize.hyperopt import EXPECTED_MAX_PROFIT, start, \
|
||||
# log_results, save_trials, read_trials, generate_roi_table
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from freqtrade.optimize.hyperopt import Hyperopt, start
|
||||
from freqtrade.optimize.hyperopt import Hyperopt
|
||||
import freqtrade.tests.conftest as tt # test tools
|
||||
|
||||
|
||||
@@ -24,7 +18,7 @@ def create_trials(mocker) -> None:
|
||||
- we might have a pickle'd file so make sure that we return
|
||||
false when looking for it
|
||||
"""
|
||||
_HYPEROPT.trials_file = os.path.join('freqtrade', 'tests', 'optimize','ut_trials.pickle')
|
||||
_HYPEROPT.trials_file = os.path.join('freqtrade', 'tests', 'optimize', 'ut_trials.pickle')
|
||||
|
||||
mocker.patch('freqtrade.optimize.hyperopt.os.path.exists', return_value=False)
|
||||
mocker.patch('freqtrade.optimize.hyperopt.os.remove', return_value=True)
|
||||
|
@@ -1,4 +1,5 @@
|
||||
# pragma pylint: disable=protected-access, invalid-name
|
||||
|
||||
"""
|
||||
Unit test file for configuration.py
|
||||
"""
|
||||
@@ -270,4 +271,3 @@ def test_setup_configuration_with_arguments(mocker, default_conf, caplog) -> Non
|
||||
'Parameter --export detected: {} ...'.format(config['export']),
|
||||
caplog.record_tuples
|
||||
)
|
||||
|
||||
|
@@ -8,7 +8,6 @@ from freqtrade.constants import Constants
|
||||
def test_constant_object() -> None:
|
||||
"""
|
||||
Test the Constants object has the mandatory Constants
|
||||
:return: None
|
||||
"""
|
||||
assert hasattr(Constants, 'CONF_SCHEMA')
|
||||
assert hasattr(Constants, 'DYNAMIC_WHITELIST')
|
||||
@@ -19,11 +18,9 @@ def test_constant_object() -> None:
|
||||
assert hasattr(Constants, 'DEFAULT_STRATEGY')
|
||||
|
||||
|
||||
|
||||
def test_conf_schema() -> None:
|
||||
"""
|
||||
Test the CONF_SCHEMA is from the right type
|
||||
:return:
|
||||
"""
|
||||
constant = Constants()
|
||||
assert isinstance(constant.CONF_SCHEMA, dict)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
import pandas
|
||||
from freqtrade.optimize import load_data
|
||||
from freqtrade.analyze import Analyze, SignalType
|
||||
from freqtrade.analyze import Analyze
|
||||
|
||||
_pairs = ['BTC_ETH']
|
||||
|
||||
|
Reference in New Issue
Block a user