Make e2e path sanity check worktree-friendly - #391
Merged
Conversation
`test_paths_exist` asserted that the repo root directory is named "ridgeplot", which fails in git worktrees and renamed clones. Check for a repo-root marker file (pyproject.toml) instead.
This comment has been minimized.
This comment has been minimized.
# Conflicts: # docs/reference/changelog.md
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.
Summary
tests/e2e/test_examples.py::test_paths_existasserted that the repository root directory is namedridgeplot. That check always fails when the test suite runs from a git worktree or a clone with a different directory name, even though the computed paths are perfectly valid.pyproject.tomlexists), which validates the same thing — that thePath(__file__).parents[2]arithmetic landed on the repo root — without depending on the checkout directory's name.Test plan
pytest tests/e2epasses from a git worktree checkout (previouslytest_paths_existfailed there): 6 passed📚 Documentation preview 📚: https://ridgeplot--391.org.readthedocs.build/en/391/