pytest-dev / pytest-dev/pytest-xdist

`addopts = --failed-first` causes "Different tests were collected" error

Open
#252 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.9k
Forks
287
Avg merge
9h 30m
Merged PRs (30d)
2

Description

I suppose cache for each gateway is separate, that's why different gateways report tests in different order.
The --failed-first setting should be ignored when reporting tests to the master node.

$ python -V
Python 3.5.2

$ pip freeze | grep pytest
pytest==3.3.0
pytest-base-url==1.4.1
pytest-cov==2.5.1
pytest-django==3.1.2
pytest-forked==0.2
pytest-html==1.16.0
pytest-metadata==1.5.1
pytest-selenium==1.11.2
pytest-variables==1.7.0
pytest-xdist==1.20.1

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the failure with Python 3.5.2, pytest 3.3.0, pytest-xdist 1.20.1, and addopts = --failed-first across multiple gateways. Start by tracing how test collection is reported to the master node; done when --failed-first is ignored for that report and gateways no longer produce different collected-test orders.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.