From b90b7b37c7356ee541ec1fac3ab474b959467ef1 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Wed, 10 Jun 2026 07:52:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(test):=20e2e=20test=20=E5=9C=A8=20collectio?= =?UTF-8?q?n=20=E9=98=B6=E6=AE=B5=E8=B7=B3=E8=BF=87(=E4=B8=8D=20import=20?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E7=9B=AE=E5=BD=95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: test_e2e_v27.py 的 skipif 只标记了函数级别,pytest collection 阶段 仍会 import 该文件,触发 sys.path.insert 指向安装目录的 spawner.py。 如果安装目录有 merge conflict 残留,整个 test job crash。 修复: 将 skipif 加入 pytestmark 级别,collection 阶段即跳过。 --- tests/e2e/test_e2e_v27.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/test_e2e_v27.py b/tests/e2e/test_e2e_v27.py index cb6f74a..8550afe 100644 --- a/tests/e2e/test_e2e_v27.py +++ b/tests/e2e/test_e2e_v27.py @@ -1,12 +1,12 @@ import pytest -pytestmark = pytest.mark.e2e - skip_no_integration = pytest.mark.skipif( not __import__("os").environ.get("RUN_INTEGRATION"), reason="Set RUN_INTEGRATION=1 to run E2E tests against real daemon", ) +pytestmark = [pytest.mark.e2e, skip_no_integration] + """v2.7 端到端测试 — 全链路真实环境 覆盖:项目管理 → Task CRUD → SubTask → Stage进度 → 状态聚合 → 依赖链 → 超时 → Mail → 真实Agent调度