Don't use __code__
__code__ is a special method name used by python already source: https://docs.python.org/3/reference/datamodel.html#special-method-names
This commit is contained in:
@@ -55,8 +55,8 @@ def test_load_strategy(default_conf, result):
|
||||
'strategy_path': str(Path(__file__).parents[2] / 'freqtrade/templates')
|
||||
})
|
||||
strategy = StrategyResolver.load_strategy(default_conf)
|
||||
assert isinstance(strategy.__code__, str)
|
||||
assert 'class SampleStrategy' in strategy.__code__
|
||||
assert isinstance(strategy.__source__, str)
|
||||
assert 'class SampleStrategy' in strategy.__source__
|
||||
assert isinstance(strategy.__file__, str)
|
||||
assert 'rsi' in strategy.advise_indicators(result, {'pair': 'ETH/BTC'})
|
||||
|
||||
|
Reference in New Issue
Block a user