コード例 #1
0
def test_file_load_json(mocker) -> None:

    # 7m .json does not exist
    ret = file_load_json(pair_data_filename(None, 'UNITTEST/BTC', '7m'))
    assert not ret
    # 1m json exists (but no .gz exists)
    ret = file_load_json(pair_data_filename(None, 'UNITTEST/BTC', '1m'))
    assert ret
    # 8 .json is empty and will fail if it's loaded. .json.gz is a copy of 1.json
    ret = file_load_json(pair_data_filename(None, 'UNITTEST/BTC', '8m'))
    assert ret
コード例 #2
0
ファイル: test_history.py プロジェクト: wesaka/freqtrade
def test_pair_data_filename():
    fn = pair_data_filename(Path('freqtrade/hello/world'), 'ETH/BTC', '5m')
    assert isinstance(fn, Path)
    assert fn == Path('freqtrade/hello/world/ETH_BTC-5m.json')