diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index 5a3b790c9..0e77572a5 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -33,18 +33,6 @@ class Backtesting(object): """ def __init__(self, config: Dict[str, Any]) -> None: self.config = config - self.analyze = None - self.ticker_interval = None - self.tickerdata_to_dataframe = None - self.populate_buy_trend = None - self.populate_sell_trend = None - self._init() - - def _init(self) -> None: - """ - Init objects required for backtesting - :return: None - """ self.analyze = Analyze(self.config) self.ticker_interval = self.analyze.strategy.ticker_interval self.tickerdata_to_dataframe = self.analyze.tickerdata_to_dataframe diff --git a/freqtrade/tests/optimize/test_backtesting.py b/freqtrade/tests/optimize/test_backtesting.py index f17a0115e..5cc41845d 100644 --- a/freqtrade/tests/optimize/test_backtesting.py +++ b/freqtrade/tests/optimize/test_backtesting.py @@ -286,23 +286,6 @@ def test_start(mocker, fee, default_conf, caplog) -> None: assert start_mock.call_count == 1 -def test_backtesting__init__(mocker, default_conf) -> None: - """ - Test Backtesting.__init__() method - """ - init_mock = MagicMock() - mocker.patch('freqtrade.optimize.backtesting.Backtesting._init', init_mock) - - backtesting = Backtesting(default_conf) - assert backtesting.config == default_conf - assert backtesting.analyze is None - assert backtesting.ticker_interval is None - assert backtesting.tickerdata_to_dataframe is None - assert backtesting.populate_buy_trend is None - assert backtesting.populate_sell_trend is None - assert init_mock.call_count == 1 - - def test_backtesting_init(mocker, default_conf) -> None: """ Test Backtesting._init() method