Flake8 in tests ...
This commit is contained in:
parent
b008649d79
commit
56768f1a61
@ -120,7 +120,7 @@ def test_analyze_ticker_default(ticker_history, mocker, caplog) -> None:
|
|||||||
|
|
||||||
)
|
)
|
||||||
strategy = DefaultStrategy({})
|
strategy = DefaultStrategy({})
|
||||||
ret = strategy.analyze_ticker(ticker_history, {'pair': 'ETH/BTC'})
|
strategy.analyze_ticker(ticker_history, {'pair': 'ETH/BTC'})
|
||||||
assert ind_mock.call_count == 1
|
assert ind_mock.call_count == 1
|
||||||
assert buy_mock.call_count == 1
|
assert buy_mock.call_count == 1
|
||||||
assert buy_mock.call_count == 1
|
assert buy_mock.call_count == 1
|
||||||
@ -130,7 +130,7 @@ def test_analyze_ticker_default(ticker_history, mocker, caplog) -> None:
|
|||||||
caplog.record_tuples)
|
caplog.record_tuples)
|
||||||
caplog.clear()
|
caplog.clear()
|
||||||
|
|
||||||
ret = strategy.analyze_ticker(ticker_history, {'pair': 'ETH/BTC'})
|
strategy.analyze_ticker(ticker_history, {'pair': 'ETH/BTC'})
|
||||||
# No analysis happens as ta_on_candle is true
|
# No analysis happens as ta_on_candle is true
|
||||||
assert ind_mock.call_count == 2
|
assert ind_mock.call_count == 2
|
||||||
assert buy_mock.call_count == 2
|
assert buy_mock.call_count == 2
|
||||||
|
@ -174,12 +174,13 @@ def test_strategy_override_ta_on_candle(caplog):
|
|||||||
}
|
}
|
||||||
resolver = StrategyResolver(config)
|
resolver = StrategyResolver(config)
|
||||||
|
|
||||||
assert resolver.strategy.ta_on_candle == True
|
assert resolver.strategy.ta_on_candle
|
||||||
assert ('freqtrade.strategy.resolver',
|
assert ('freqtrade.strategy.resolver',
|
||||||
logging.INFO,
|
logging.INFO,
|
||||||
"Override ta_on_candle 'ta_on_candle' with value in config file: True."
|
"Override ta_on_candle 'ta_on_candle' with value in config file: True."
|
||||||
) in caplog.record_tuples
|
) in caplog.record_tuples
|
||||||
|
|
||||||
|
|
||||||
def test_deprecate_populate_indicators(result):
|
def test_deprecate_populate_indicators(result):
|
||||||
default_location = path.join(path.dirname(path.realpath(__file__)))
|
default_location = path.join(path.dirname(path.realpath(__file__)))
|
||||||
resolver = StrategyResolver({'strategy': 'TestStrategyLegacy',
|
resolver = StrategyResolver({'strategy': 'TestStrategyLegacy',
|
||||||
|
Loading…
Reference in New Issue
Block a user