Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes with KeyError: 'retried' when test is retried with pytest-retry #815

Open
angelos-p opened this issue May 30, 2024 · 1 comment
Open

Comments

@angelos-p
Copy link

It looks like the html reporter does not handle tests with the outcome retried.

It's quite easy to reproduce:

  1. Create a failing test with the mark @pytest.mark.flaky(retries=3, delay=1)
  2. Run the test and wait for it to fail so that it is retried
  3. Pytest crashes with:
File "/__w/xi/xi/tests/venv/lib/python3.9/site-packages/pytest_html/report_data.py", line 94, in outcomes
  self._outcomes[outcome.lower()]["value"] += 1
KeyError: 'retried'
@rambhupala-merla
Copy link

I am also facing the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants