pytest-dev / pytest-dev/pytest-rerunfailures

set reruns does not work

Open
#265 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
477
Forks
107
Avg merge
2d 14h
Merged PRs (30d)
21

Description

I've already set --rerun 1, bug it does not work

pytest args: ['-n', '7', '--reruns', '1', '--dist', 'loadscope', 'test/xxxx/test_case/xxxxxx', '--alluredir', 'allure_report/xml', '--junitxml=output/result.xml']


class TestDebugRerun:

    def test_debug_rerun(self):
        logging.info("post request")
        assert False

=========================== short test summary info ============================
2024-03-08 11:10:43.929 FAILED xxxxxxxxxx.py::TestDebugRerun::test_debug_rerun
2024-03-08 11:10:43.929 ============== 1 failed in xxxxxS (0:01:16) ==============

python==3.7
pytest==6.2.1
pytest-rerunfailures==12.0
pytest-xdist==3.5.0

If you could give me more help?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported command with Python 3.7, pytest 6.2.1, pytest-rerunfailures 12.0, and pytest-xdist 3.5.0, using the shown test that always fails. Check how the rerun option behaves with xdist and the reported spelling; done means the failed test is retried once and the resulting report reflects that retry.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.