From 2cc5522c90d98e87e5be43b8ba46744e918138f0 Mon Sep 17 00:00:00 2001 From: Siew Kam Onn Date: Tue, 17 Mar 2026 16:26:19 +0800 Subject: [PATCH] Remove global doctest from pytest and split CI Eliminate global doctest enablement from pytest defaults by removing the addopts line in pyproject.toml. Split the CI test execution in test.yml:92 to run unit tests. Run doctests in a separate step using --doctest-modules for the datafusion package at test.yml:99. --- .github/workflows/test.yml | 10 ++++++++-- pyproject.toml | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a2f304aa5..d18f53df9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,12 +89,18 @@ jobs: exit 1 fi - - name: Run tests + - name: Run unit tests env: RUST_BACKTRACE: 1 run: | git submodule update --init - uv run --no-project pytest -v --import-mode=importlib + uv run --no-project pytest -v --import-mode=importlib python/tests + + - name: Run doctests + env: + RUST_BACKTRACE: 1 + run: | + uv run --no-project pytest -v --import-mode=importlib --doctest-modules python/datafusion - name: FFI unit tests run: | diff --git a/pyproject.toml b/pyproject.toml index 117aeefc2..c2c5a93dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,6 @@ features = ["substrait"] [tool.pytest.ini_options] asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "function" -addopts = "--doctest-modules" doctest_optionflags = ["NORMALIZE_WHITESPACE", "ELLIPSIS"] testpaths = ["python/tests", "python/datafusion"]