Skip to content

Commit c86a4b6

Browse files
committed
Make e2e path sanity check worktree-friendly
`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.
1 parent 5924de4 commit c86a4b6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/e2e/test_examples.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313

1414

1515
def test_paths_exist() -> None:
16-
assert PATH_ROOT.name == "ridgeplot"
16+
# Sanity check that PATH_ROOT points at the repo root, without
17+
# depending on the name of the checkout directory (which differs
18+
# in git worktrees and renamed clones)
19+
assert (PATH_ROOT / "pyproject.toml").is_file()
1720
assert PATH_ARTIFACTS.is_dir()
1821
assert PATH_CHARTS.is_dir()
1922

0 commit comments

Comments
 (0)