How should I go about getting `./pants test` to in...
# general
s
How should I go about getting
./pants test
to include doctests? I added
Copy code
python_tests(
    name="tests",
    sources=["*.py"],
)
as a target in my directory and ran
./pants test foobar/:: -- --doctest-modules
but it fails on a bunch of files without tests
b
In case you haven't seen it, https://github.com/pantsbuild/pants/issues/11227 seems to have various discussions. Potentially you could have
sources
be an allowlist of only the files that have doctests (
sources=["has_doctests.py", "also_has.py"]
), or use
!
to exclude ones that don't, as a denylist, (
sources=["*.py", "!no_doctests.py"]
)
👀 1