Skip to content

Commit 7a01f53

Browse files
committed
Extend tests
1 parent c2657cf commit 7a01f53

32 files changed

+246
-139640
lines changed

tests/app/algorithm/test_get_allocated.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010

1111
class StrategyOne(TradingStrategy):
12+
id = "strategy_one"
1213
time_unit = TimeUnit.SECOND
1314
interval = 2
1415

tests/app/algorithm/test_run_strategy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313

1414
class StrategyOne(TradingStrategy):
15+
id = "strategy_one"
1516
time_unit = TimeUnit.SECOND
1617
interval = 2
1718

@@ -24,6 +25,7 @@ def generate_buy_signals(self, data: Dict[str, Any]) -> Dict[
2425
pass
2526

2627
class StrategyTwo(TradingStrategy):
28+
id = "strategy_two"
2729
time_unit = TimeUnit.SECOND
2830
interval = 2
2931

tests/app/backtesting/test_backtest_report.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99

1010
class TestStrategy(TradingStrategy):
11+
id = "test_algorithm"
1112
strategy_id = "test_strategy"
1213
time_unit = TimeUnit.MINUTE
1314
interval = 1

tests/app/reporting/test_backtest_report.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def test_save_without_algorithm(self):
7373
]
7474

7575
backtest = Backtest(
76+
algorithm_id="alg-025",
7677
backtest_runs=[run],
7778
)
7879
output_path = os.path.join(self.resource_dir, "backtest_report")
@@ -161,6 +162,7 @@ def test_save_with_strategies_directory(self):
161162
]
162163

163164
backtest = Backtest(
165+
algorithm_id="alg-025",
164166
backtest_runs=[results],
165167
risk_free_rate=0.0
166168
)

0 commit comments

Comments
 (0)