From f7f99fffb23c356cd7d2a35f645350a7342034fc Mon Sep 17 00:00:00 2001 From: Talel Boussetta Date: Sun, 15 Nov 2026 17:04:50 +0100 Subject: [PATCH] test(docker): skip test_pool_recycle_config when deps are missing The module imported crawl4ai at the top, above the pytest.importorskip guard for crawler_pool. Without the package's dependencies installed, the import raised ModuleNotFoundError during collection and the whole run was interrupted, instead of skipping with "docker server deps not installed" as the guard intends. Move the crawl4ai import below the guard. Follow-up to #2232 (refs #2231). --- tests/docker/test_pool_recycle_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/docker/test_pool_recycle_config.py b/tests/docker/test_pool_recycle_config.py index c89f48273..f1532bf13 100644 --- a/tests/docker/test_pool_recycle_config.py +++ b/tests/docker/test_pool_recycle_config.py @@ -14,14 +14,14 @@ import pytest import yaml -from crawl4ai import BrowserConfig - ROOT = Path(__file__).resolve().parents[2] DOCKER_DIR = ROOT / "deploy" / "docker" sys.path.insert(0, str(DOCKER_DIR)) pool = pytest.importorskip("crawler_pool", reason="docker server deps not installed") +from crawl4ai import BrowserConfig # noqa: E402 (after importorskip so missing deps skip) + def test_config_enables_recycling(): cfg = yaml.safe_load((DOCKER_DIR / "config.yml").read_text())