An aborted Playwright run never reaches `afterAll`, so its flows and dashboards stayed in the store until somebody deleted them by hand. A setup-project test now removes them before the next run, which is the only point that is reached even when the run before it died. The suite runs against whatever stack is up — somebody's own instance with real flows in it — so the predicate matches only the shape every fixture has, `test_<spec>_<base36 Date.now()>` with an optional suffix, and only once that timestamp is an hour old. Also correct the coverage-html fallback hint: `make clean` cannot clear a root-owned htmlcov either, for the same reason `coverage html` cannot write it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VfgHWr7AQDiLsTQVu7hpKB
14 lines
531 B
Bash
Executable File
14 lines
531 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
set -x
|
|
|
|
coverage run -m pytest tests/
|
|
coverage report
|
|
# The HTML report is a convenience: a container run can leave htmlcov/ owned by
|
|
# root, and failing here after a green suite reads like a test failure. `make
|
|
# clean` is no way out of that one — removing the files inside a directory
|
|
# needs write permission on it, which is the permission that is missing.
|
|
coverage html --title "${@-coverage}" \
|
|
|| echo " ! coverage html failed — tests passed (htmlcov/ root-owned? sudo rm -rf htmlcov)" >&2
|