From daef3bd22e2f1761a65aef1911018410bbd5f5ac Mon Sep 17 00:00:00 2001 From: claude_dev Date: Thu, 10 Sep 2026 22:52:35 +0800 Subject: [PATCH] =?UTF-8?q?test(bs):=20=E4=B8=A4=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=96=87=E4=BB=B6isolated=5Fmain=5Fenv=E5=BD=92=E9=9B=B6MIN=5F?= =?UTF-8?q?STOCK=5FLIST=E2=80=94=E2=80=94=E5=B0=8F=E5=90=8D=E5=8D=95mock?= =?UTF-8?q?=E8=BF=87=E5=AE=88=E5=8D=AB,=E4=B8=8D=E5=8A=A8=E8=A2=AB?= =?UTF-8?q?=E6=B5=8B=E8=A1=8C=E4=B8=BA=20[vps]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Code --- tests/data_platform/test_bs_eod_index.py | 1 + tests/data_platform/test_bs_eod_resilience.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/data_platform/test_bs_eod_index.py b/tests/data_platform/test_bs_eod_index.py index 5b5a8eb..25df8d6 100644 --- a/tests/data_platform/test_bs_eod_index.py +++ b/tests/data_platform/test_bs_eod_index.py @@ -164,6 +164,7 @@ def test_index_codes_probed_availability(): @pytest.fixture def isolated_main_env(tmp_path, monkeypatch, reset_query_count): + monkeypatch.setattr(bs_eod, "MIN_STOCK_LIST", 0) # 小名单 mock, 关名单规模守卫 monkeypatch.setattr(bs_eod, "DB", tmp_path / "fake.db") val = tmp_path / "val" val.mkdir(parents=True, exist_ok=True) diff --git a/tests/data_platform/test_bs_eod_resilience.py b/tests/data_platform/test_bs_eod_resilience.py index f0efe5d..fac4d3a 100644 --- a/tests/data_platform/test_bs_eod_resilience.py +++ b/tests/data_platform/test_bs_eod_resilience.py @@ -398,6 +398,7 @@ def test_upsert_15m_empty_rows_no_op(tmp_db, tmp_valdir): @pytest.fixture def isolated_main_env(tmp_path, monkeypatch, reset_query_count): """main() 集成测试环境: 重定向 DB/VAL_DIR/sys.argv, mock baostock 模块.""" + monkeypatch.setattr(bs_eod, "MIN_STOCK_LIST", 0) # 小名单 mock, 关名单规模守卫 monkeypatch.setattr(bs_eod, "DB", tmp_path / "fake.db") val = tmp_path / "val" val.mkdir(parents=True, exist_ok=True)