diff --git a/pyproject.toml b/pyproject.toml index c68de04..22e8a52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,9 +71,6 @@ ruff = ["ruff==0.17.4"] [tool.flit.sdist] exclude = [ "docs/", - "style/", - "tests/", - "tools/", ] [tool.ruff.lint] diff --git a/tests/test_css.py b/tests/test_css.py index 042e133..8767f7c 100644 --- a/tests/test_css.py +++ b/tests/test_css.py @@ -22,7 +22,15 @@ import pytest -REPO_ROOT = Path(__file__).resolve().parent.parent +TEST_ROOT = Path(__file__).resolve().parent.parent +REPO_ROOT = next( + ( + parent + for parent in (TEST_ROOT, *TEST_ROOT.parents) + if (parent / "tools" / "generate_css.py").is_file() + ), + TEST_ROOT, +) TOOLS_DIR = REPO_ROOT / "tools" ARTIFACT = REPO_ROOT / "sphinx_design" / "static" / "sphinx-design.min.css"