コード例 #1
0
def test_search_strategy():
    default_location = os.path.join(
        os.path.dirname(os.path.realpath(__file__)), '..', '..', 'strategy')
    assert isinstance(
        StrategyResolver._search_strategy(default_location, 'DefaultStrategy'),
        IStrategy)
    assert StrategyResolver._search_strategy(default_location,
                                             'NotFoundStrategy') is None
コード例 #2
0
ファイル: test_strategy.py プロジェクト: ynzheng/freqtrade
def test_search_strategy():
    default_config = {}
    default_location = path.join(path.dirname(path.realpath(__file__)), '..',
                                 '..', 'strategy')
    assert isinstance(
        StrategyResolver._search_strategy(default_location,
                                          config=default_config,
                                          strategy_name='DefaultStrategy'),
        IStrategy)
    assert StrategyResolver._search_strategy(
        default_location,
        config=default_config,
        strategy_name='NotFoundStrategy') is None