upgrade 1.4.0 correction de bug

This commit is contained in:
ploush 2026-11-29 22:01:00 +01:00
parent 81ef12a9cd
commit 57a3467ed6

View file

@ -63,11 +63,14 @@ def test_package_includes_every_static_file():
from ..outils import RACINE
patterns = tomllib.loads((RACINE / "pyproject.toml").read_text())["tool"]["setuptools"]["package-data"]["shortstats"]
# l'arborescence source, pas HERE : installé hors mode éditable (image Docker),
# HERE vise la copie de site-packages, qui n'a déjà que les fichiers retenus
package = RACINE / "src" / "shortstats"
for path in (HERE / "static").rglob("*"):
web = package / "web"
for path in (web / "static").rglob("*"):
if path.is_file() and path.parent.name != "__pycache__" and not path.name.endswith(".LEGAL.txt"):
rel = path.relative_to(package).as_posix()
assert any(fnmatch.fnmatchcase(rel, p) and rel.count("/") == p.count("/") for p in patterns), rel
for path in (HERE / "templates").glob("*.html"):
for path in (web / "templates").glob("*.html"):
rel = path.relative_to(package).as_posix()
assert any(fnmatch.fnmatchcase(rel, p) for p in patterns), rel