Skip to content

Optimize scenario tests: stop-loss/take-profit test #389

@MDUYN

Description

@MDUYN

Problem

The stop-loss/take-profit scenario test in tests/scenarios/test_strategy_with_stop_losses_take_profits.py is currently skipped via @unittest.skip as part of the scenario test optimization effort.

Required changes

  1. Reduce execution time — Ensure the test completes within 30 seconds. Use minimal date ranges that still exercise the stop-loss and take-profit logic.

  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). The test currently uses CSVOHLCVDataProvider which is good, but ensure the referenced CSV file lives under tests/resources/test_data/.

Affected files

  • tests/scenarios/test_strategy_with_stop_losses_take_profits.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