Problem
The event backtest scenario tests in tests/scenarios/event_backtests/ are too slow for CI (they cause Ubuntu runners to timeout). They are currently skipped via @unittest.skip.
Required changes
-
Reduce execution time — The event backtest engine iterates through each time step with multiple DB round-trips per iteration. These tests use long date ranges (100–365 days at 2h intervals = 1200–4380 iterations). Reduce date ranges and/or use coarser time frames to bring each test under ~30 seconds.
-
Use only offline test data from tests/resources/test_data/ — All data sources must reference CSV files located in tests/resources/test_data/ (or its subdirectories). Tests should not depend on data files scattered across tests/resources/data/ or tests/resources/market_data_sources_for_testing/. This ensures tests are self-contained, reproducible, and don't break when external data files are reorganized.
Affected files
tests/scenarios/event_backtests/test_run_backtest_algorithm_param.py
tests/scenarios/event_backtests/test_run_backtest_with_pandas_datasources.py
tests/scenarios/event_backtests/test_run_backtest_single_strategy_param.py (commented out)
tests/scenarios/event_backtests/test_run_backtest_multiple_strategies_param.py (commented out)
tests/scenarios/event_backtests/test_run_backtest_strategies_attribute.py (commented out)
tests/scenarios/event_backtests/test_run_backtests_algorithms_param.py (commented out)
Acceptance criteria
Problem
The event backtest scenario tests in
tests/scenarios/event_backtests/are too slow for CI (they cause Ubuntu runners to timeout). They are currently skipped via@unittest.skip.Required changes
Reduce execution time — The event backtest engine iterates through each time step with multiple DB round-trips per iteration. These tests use long date ranges (100–365 days at 2h intervals = 1200–4380 iterations). Reduce date ranges and/or use coarser time frames to bring each test under ~30 seconds.
Use only offline test data from
tests/resources/test_data/— All data sources must reference CSV files located intests/resources/test_data/(or its subdirectories). Tests should not depend on data files scattered acrosstests/resources/data/ortests/resources/market_data_sources_for_testing/. This ensures tests are self-contained, reproducible, and don't break when external data files are reorganized.Affected files
tests/scenarios/event_backtests/test_run_backtest_algorithm_param.pytests/scenarios/event_backtests/test_run_backtest_with_pandas_datasources.pytests/scenarios/event_backtests/test_run_backtest_single_strategy_param.py(commented out)tests/scenarios/event_backtests/test_run_backtest_multiple_strategies_param.py(commented out)tests/scenarios/event_backtests/test_run_backtest_strategies_attribute.py(commented out)tests/scenarios/event_backtests/test_run_backtests_algorithms_param.py(commented out)Acceptance criteria
tests/resources/test_data/@unittest.skipdecorator once optimized