Skip to content

Commit c9b8863

Browse files
committed
Ensure traces are preserved (playwright) for failed tests
1 parent f3c8238 commit c9b8863

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tox.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ commands =
5656
# tox run -e compile-assets,i18n-compile,py39-sphinx61-tests
5757
# run tests without coverage
5858
# tox run -e compile-assets,i18n-compile,py39-tests-no-cov
59+
# by default we will retain playwright traces on failure
5960
[testenv:py3{9,10,11,12}{,-sphinx61,-sphinxdev,}-tests{,-no-cov}]
6061
description = "Run tests Python and Sphinx versions. If a Sphinx version is specified, it will use that version vs the default in pyproject.toml"
6162
# need to ensure the package is installed in editable mode
@@ -75,8 +76,8 @@ allowlist_externals=
7576
bash
7677
commands =
7778
bash -c 'if [[ "{env:GITHUB_ACTIONS:}" == "true" ]]; then playwright install --with-deps; else playwright install; fi'
78-
py3{9,10,11,12}{,-sphinx61,-sphinxdev,}-tests: coverage run -m pytest -m "not a11y" {posargs}
79-
py3{9,10,11,12}{,-sphinx61,-sphinxdev,}-tests-no-cov: pytest -m "not a11y" {posargs}
79+
py3{9,10,11,12}{,-sphinx61,-sphinxdev,}-tests: coverage run -m pytest -m "not a11y" {posargs:--tracing=retain-on-failure}
80+
py3{9,10,11,12}{,-sphinx61,-sphinxdev,}-tests-no-cov: pytest -m "not a11y" {posargs:--tracing=retain-on-failure}
8081

8182
# run accessibility tests with Playwright and axe-core
8283
# compiling the assets is needed before running the tests

0 commit comments

Comments
 (0)