Skip to content

Optimize scenario tests: README example test #390

@MDUYN

Description

@MDUYN

Problem

The README example scenario test in tests/scenarios/test_readme_example.py is currently skipped via @unittest.skip as part of the scenario test optimization effort.

Required changes

  1. Reduce execution time — The test dynamically extracts and runs strategy code from README.md, including a vector backtest over a 1.5-year range. Use a shorter date range (e.g. 60–90 days) to keep execution under 30 seconds.

  2. 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/test_readme_example.py

Acceptance criteria

  • Test runs in under 30 seconds
  • Test uses data exclusively from tests/resources/test_data/
  • Remove the @unittest.skip decorator once optimized
  • Test passes on both macOS and Ubuntu CI runners

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions