diff --git a/tests/factor/test_data_adapter.py b/tests/factor/test_data_adapter.py index f44ebc1..01e2e52 100644 --- a/tests/factor/test_data_adapter.py +++ b/tests/factor/test_data_adapter.py @@ -28,7 +28,7 @@ def _make_bar(symbol, dt, close): def test_convert_bars_to_alpha_df_columns(): """Test that convert_bars_to_alpha_df produces correct column structure.""" - bars = [_make_bar("600000", datetime(2024, 1, i), 10.0 + i) for i in range(1, 6)] + bars = [_make_bar("600000", datetime(2024, 1, i + 1), 10.0 + i) for i in range(5)] from sanguo_factor.data_adapter import convert_bars_to_alpha_df df = convert_bars_to_alpha_df(bars) @@ -41,7 +41,7 @@ def test_convert_bars_to_alpha_df_columns(): def test_convert_bars_to_alpha_df_values(): """Test that convert_bars_to_alpha_df correctly converts BarData values.""" - bars = [_make_bar("600000", datetime(2024, 1, i), 10.0 + i) for i in range(1, 6)] + bars = [_make_bar("600000", datetime(2024, 1, i + 1), 10.0 + i) for i in range(5)] from sanguo_factor.data_adapter import convert_bars_to_alpha_df df = convert_bars_to_alpha_df(bars) @@ -72,7 +72,7 @@ def test_save_alpha_lab_data(): from pathlib import Path from sanguo_factor.data_adapter import save_alpha_lab_data - bars = [_make_bar("600000", datetime(2024, 1, i), 10.0 + i) for i in range(1, 6)] + bars = [_make_bar("600000", datetime(2024, 1, i + 1), 10.0 + i) for i in range(5)] with tempfile.TemporaryDirectory() as tmpdir: lab_path = Path(tmpdir) / "alpha_lab"