diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 17:06:49 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 17:06:49 +0900 |
| commit | adf5e96542ebd65c7d13ca5e9825071183b3ef13 (patch) | |
| tree | 699800730cc9f68ab775bea5722ba55cf08b304a /tests/integration/test_strategy_signal_flow.py | |
| parent | b8dc7344ff99eb23d5f003795f17cdba3b89c40b (diff) | |
fix: lint fixes for integration tests and backtester noqa annotations
Diffstat (limited to 'tests/integration/test_strategy_signal_flow.py')
| -rw-r--r-- | tests/integration/test_strategy_signal_flow.py | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/tests/integration/test_strategy_signal_flow.py b/tests/integration/test_strategy_signal_flow.py index ee47f8e..448329f 100644 --- a/tests/integration/test_strategy_signal_flow.py +++ b/tests/integration/test_strategy_signal_flow.py @@ -1,17 +1,20 @@ """Integration test: candle -> strategy engine -> signal.""" + 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")) import pytest from decimal import Decimal from datetime import datetime, timezone -from unittest.mock import AsyncMock, MagicMock +from unittest.mock import AsyncMock -from shared.models import Candle, OrderSide -from shared.events import CandleEvent, Event +from shared.models import Candle +from shared.events import CandleEvent from strategy_engine.engine import StrategyEngine @@ -21,12 +24,18 @@ def candles(): base = [] for i in range(20): price = Decimal(str(100 - i * 2)) # 100, 98, 96... - base.append(Candle( - symbol="BTCUSDT", timeframe="1m", - open_time=datetime(2025, 1, 1, i, 0, tzinfo=timezone.utc), - open=price, high=price + 1, low=price - 1, - close=price, volume=Decimal("10"), - )) + base.append( + Candle( + symbol="BTCUSDT", + timeframe="1m", + open_time=datetime(2025, 1, 1, i, 0, tzinfo=timezone.utc), + open=price, + high=price + 1, + low=price - 1, + close=price, + volume=Decimal("10"), + ) + ) return base |
