Repository navigation
Collect the tests from where they are - #139
Merged
Merged
Conversation
pytest is given no path, so it walks everything under the root looking for tests. That is how it found pybind11's own suite when the fetched sources briefly landed inside the checkout, and failed two jobs collecting a conftest that imports a module nobody built. Naming the directory ends the whole class of failure, and stops the walk descending into build/ and external/rexlib on every run. All twenty-two test files live there; nothing moves. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



pytestis given no path, so it walks everything under the root lookingfor tests. That is how it found pybind11's own suite when the fetched
sources briefly landed inside the checkout, and failed two jobs
collecting a
conftest.pythat imports a module nobody had built.Naming the directory ends the class of failure rather than the instance,
and stops the walk descending into
build/andexternal/rexlibonevery run.
The check that matters
testpathsfails silently when it is wrong: tests outside the nameddirectory stop running and nothing says so. All twenty-two test files
this repository tracks are under
tests/, and none matches pytest'spatterns anywhere else.
The run confirms it. The last build to reach collection reported
collected 296 items / 1 error— the 296 ours, the error pybind11's. Ifthis run reports 296 collected and no error, nothing was lost.
🤖 Generated with Claude Code