diff --git a/freqtrade/optimize/__init__.py b/freqtrade/optimize/__init__.py index e94fd913c..a77576a27 100644 --- a/freqtrade/optimize/__init__.py +++ b/freqtrade/optimize/__init__.py @@ -58,7 +58,7 @@ def preprocess(tickerdata: Dict[str, List]) -> Dict[str, DataFrame]: def testdata_path() -> str: """Return the path where testdata files are stored""" - return os.path.abspath(os.path.dirname(__file__)) + '/../tests/testdata' + return os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'tests', 'testdata')) def download_pairs(pairs: List[str]) -> bool: diff --git a/freqtrade/tests/test_optimize_backtesting.py b/freqtrade/tests/test_optimize_backtesting.py index 812dd7b0c..558cfd8d1 100644 --- a/freqtrade/tests/test_optimize_backtesting.py +++ b/freqtrade/tests/test_optimize_backtesting.py @@ -42,7 +42,7 @@ def test_backtest_with_new_pair(default_conf, ticker_history, mocker): def test_testdata_path(): - assert str('freqtrade/optimize/../tests/testdata') in testdata_path() + assert os.path.join('freqtrade', 'tests', 'testdata') in testdata_path() def test_download_pairs(default_conf, ticker_history, mocker):