From 045b7f9f151912d672c3ebeb12426da608b5d15f Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Tue, 8 Sep 2026 18:53:04 +0200 Subject: [PATCH] build-tantivy: drop the doctest-modules test pass Not real coverage: tantivy's compiled classes report __module__ as tantivy.tantivy (the compiled submodule), not tantivy (the wrapper package), so pytest's doctest-modules collector -- whether invoked via --pyargs tantivy or a path-based tantivy target -- finds 0 items against the installed wheel, matching a bare doctest.testmod() call against the actual submodule (confirmed locally against the published 0.25.1 wheel). Exit code 5 (no tests ran) then fails the CIBW_TEST_COMMAND chain. The real pytest suite (tests/, 154 items including the markdown-doc doctests via mktestdocs) is unaffected and is the suite upstream's own CI runs. --- .github/workflows/build-tantivy.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-tantivy.yml b/.github/workflows/build-tantivy.yml index 3aaa32cf7..c361f3ba6 100644 --- a/.github/workflows/build-tantivy.yml +++ b/.github/workflows/build-tantivy.yml @@ -64,15 +64,14 @@ jobs: # The repo-root tantivy/ package (from .tantivy import *) shadows the # wheel's compiled submodule when tested in place (no .so there outside # a maturin-develop editable install), so stage only what the suite - # needs and test the installed wheel via --pyargs (gotcha 25). - # docs/contributing.md is a symlink to ../CONTRIBUTING.md, so that file - # needs staging too or the doctest suite hits a dangling link. + # needs (gotcha 25). docs/contributing.md is a symlink to + # ../CONTRIBUTING.md, so that file needs staging too or test_docs.py + # hits a dangling link. CIBW_TEST_SOURCES: tests docs CONTRIBUTING.md CIBW_TEST_REQUIRES: pytest mktestdocs==0.2.1 CIBW_TEST_COMMAND: >- python -c "import tantivy.tantivy as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest tests && - python -m pytest --pyargs tantivy --doctest-modules + python -m pytest tests - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: