-
Notifications
You must be signed in to change notification settings - Fork 93
Description
Problem
The vectorized backtest scenario tests in tests/scenarios/vectorized_backtests/ are too slow for CI (they cause Ubuntu runners to timeout). They are currently skipped via @unittest.skip.
Required changes
-
Reduce execution time — These tests run multiple vector backtests with parameter grids and multi-year date ranges. Reduce date ranges, shrink parameter grids, and ensure each test completes in 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/vectorized_backtests/test_run_vector_backtest.pytests/scenarios/vectorized_backtests/test_run_vector_backtests.pytests/scenarios/vectorized_backtests/test_use_checkpoints.pytests/scenarios/vectorized_backtests/test_use_backtest_storage_directory.pytests/scenarios/vectorized_backtests/test_with_show_progress.pytests/scenarios/vectorized_backtests/test_with_window_filter_function.pytests/scenarios/vectorized_backtests/test_with_final_filter_function.pytests/scenarios/vectorized_backtests/test_vector_backtest_fixes.pytests/scenarios/vectorized_backtests/test_metadata_preservation.py
Acceptance criteria
- All tests in this folder run in under 30 seconds each
- All tests use data exclusively from
tests/resources/test_data/ - Remove the
@unittest.skipdecorator once optimized - Tests pass on both macOS and Ubuntu CI runners