From 752520c8235054c79a72ea63fe4d1964632635ac Mon Sep 17 00:00:00 2001 From: Samuel Husso Date: Thu, 26 Oct 2017 10:24:22 +0300 Subject: [PATCH] When running from project root download the files to the testdata folder instead of cwd --- freqtrade/tests/testdata/download_backtest_data.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/freqtrade/tests/testdata/download_backtest_data.py b/freqtrade/tests/testdata/download_backtest_data.py index 1119aac42..d6212cfea 100644 --- a/freqtrade/tests/testdata/download_backtest_data.py +++ b/freqtrade/tests/testdata/download_backtest_data.py @@ -5,6 +5,7 @@ from urllib.request import urlopen CURRENCIES = ["ok", "neo", "dash", "etc", "eth", "snt"] +OUTPUT_DIR = 'freqtrade/tests/testdata/' for cur in CURRENCIES: url1 = 'https://bittrex.com/Api/v2.0/pub/market/GetTicks?marketName=BTC-' @@ -12,5 +13,6 @@ for cur in CURRENCIES: x = urlopen(url) json_data = x.read() json_str = str(json_data, 'utf-8') - with open('btc-'+cur+'.json', 'w') as file: + output = OUTPUT_DIR + 'btc-'+cur+'.json' + with open(output, 'w') as file: file.write(json_str)