fix: add hypothesis to test deps and fix missing imports in deep tests

This commit is contained in:
TPTBusiness
2026-05-09 18:06:39 +02:00
parent 3d38d88248
commit abca9eb899
7 changed files with 13 additions and 2 deletions
+1
View File
@@ -1,3 +1,4 @@
# Requirements for test.
coverage
hypothesis
pytest
+2 -1
View File
@@ -1,3 +1,4 @@
"""Deep property-based tests for the unified backtest engine.
Extends test_vbt_backtest.py with hypothesis-based property tests,
@@ -10,8 +11,8 @@ import numpy as np
import pandas as pd
import pytest
from hypothesis import assume, given, settings
from hypothesis import strategies as st
from hypothesis import assume, given, settings
from hypothesis.extra.numpy import arrays
from rdagent.components.backtesting.vbt_backtest import (
+2
View File
@@ -5,6 +5,8 @@ the StrategyOrchestrator at the correct import path.
"""
from __future__ import annotations
from hypothesis import given, settings, HealthCheck
from hypothesis import strategies as st
import sys
from pathlib import Path
+2
View File
@@ -5,6 +5,8 @@ without requiring real StrategyOrchestrator connections.
"""
from __future__ import annotations
from hypothesis import given, settings, HealthCheck
from hypothesis import strategies as st
import sys
from pathlib import Path
+2
View File
@@ -5,6 +5,8 @@ criteria, and the TeeFile logger — without requiring real OHLCV data or LLM.
"""
from __future__ import annotations
from hypothesis import given, settings, HealthCheck
from hypothesis import strategies as st
import json
import os
+2
View File
@@ -5,6 +5,8 @@ command building, and API key loading logic.
"""
from __future__ import annotations
from hypothesis import given, settings, HealthCheck
from hypothesis import strategies as st
import os
import signal
+2 -1
View File
@@ -1,3 +1,4 @@
"""Deep tests for verify_runtime — property-based, fuzzing, edge cases.
Extends test_verify_runtime.py with property-based tests using hypothesis
@@ -15,8 +16,8 @@ import pytest
PROJECT_ROOT = Path(__file__).parent.parent.parent
sys.path.insert(0, str(PROJECT_ROOT))
from hypothesis import assume, given, settings
from hypothesis import strategies as st
from hypothesis import given, settings
from hypothesis.extra.numpy import arrays
from rdagent.components.backtesting.verify import verify_and_log, verify_backtest_result