upgrade 1.4.0 correction de bug
This commit is contained in:
parent
81ef12a9cd
commit
f3c376fe9d
1 changed files with 5 additions and 2 deletions
|
|
@ -63,11 +63,14 @@ def test_package_includes_every_static_file():
|
||||||
from ..outils import RACINE
|
from ..outils import RACINE
|
||||||
|
|
||||||
patterns = tomllib.loads((RACINE / "pyproject.toml").read_text())["tool"]["setuptools"]["package-data"]["shortstats"]
|
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"
|
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"):
|
if path.is_file() and path.parent.name != "__pycache__" and not path.name.endswith(".LEGAL.txt"):
|
||||||
rel = path.relative_to(package).as_posix()
|
rel = path.relative_to(package).as_posix()
|
||||||
assert any(fnmatch.fnmatchcase(rel, p) and rel.count("/") == p.count("/") for p in patterns), rel
|
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()
|
rel = path.relative_to(package).as_posix()
|
||||||
assert any(fnmatch.fnmatchcase(rel, p) for p in patterns), rel
|
assert any(fnmatch.fnmatchcase(rel, p) for p in patterns), rel
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue