summaryrefslogtreecommitdiff
path: root/tests/integration/test_backtest_end_to_end.py
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-01 17:06:49 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-01 17:06:49 +0900
commitadf5e96542ebd65c7d13ca5e9825071183b3ef13 (patch)
tree699800730cc9f68ab775bea5722ba55cf08b304a /tests/integration/test_backtest_end_to_end.py
parentb8dc7344ff99eb23d5f003795f17cdba3b89c40b (diff)
fix: lint fixes for integration tests and backtester noqa annotations
Diffstat (limited to 'tests/integration/test_backtest_end_to_end.py')
-rw-r--r--tests/integration/test_backtest_end_to_end.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/integration/test_backtest_end_to_end.py b/tests/integration/test_backtest_end_to_end.py
index 4bdb5f3..4a484f5 100644
--- a/tests/integration/test_backtest_end_to_end.py
+++ b/tests/integration/test_backtest_end_to_end.py
@@ -1,12 +1,14 @@
"""Integration test: full backtest with real strategy on generated candles."""
+
import sys
from pathlib import Path
-sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "services" / "strategy-engine" / "src"))
+sys.path.insert(
+ 0, str(Path(__file__).resolve().parents[2] / "services" / "strategy-engine" / "src")
+)
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "services" / "strategy-engine"))
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "services" / "backtester" / "src"))
-import pytest
from decimal import Decimal
from datetime import datetime, timedelta, timezone
@@ -17,10 +19,13 @@ from backtester.engine import BacktestEngine
def _generate_candles(prices: list[float], symbol="BTCUSDT") -> list[Candle]:
return [
Candle(
- symbol=symbol, timeframe="1h",
+ symbol=symbol,
+ timeframe="1h",
open_time=datetime(2025, 1, 1, tzinfo=timezone.utc) + timedelta(hours=i),
- open=Decimal(str(p)), high=Decimal(str(p + 100)),
- low=Decimal(str(p - 100)), close=Decimal(str(p)),
+ open=Decimal(str(p)),
+ high=Decimal(str(p + 100)),
+ low=Decimal(str(p - 100)),
+ close=Decimal(str(p)),
volume=Decimal("100"),
)
for i, p in enumerate(prices)