pytest-dev / pytest-dev/pytest-xdist
xdist vs --last-failed at test-session-start banner
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 287
- Avg merge
- 9h 30m
- Merged PRs (30d)
- 2
Description
i noticed, that using xdist causes --lf banner do not show up. when calling my tests with --lf and without -n i can see eg:
============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-7.0.1, pluggy-1.0.0
cachedir: (...)
rootdir: (...)
plugins: html-3.1.1, forked-1.4.0, lazy-fixture-0.6.3, logger-0.5.1, qgp-0.4.3, typeguard-2.12.1, timeout-2.0.2, xdist-2.5.0, metadata-1.11.0, repeat-0.9.1
timeout: 150.0s
timeout method: thread
timeout func_only: False
collected 3 items
run-last-failure: rerun previous 3 failures (skipped 4 files)
(and the actual tests here)
but when running with xdist (-n auto), it overwrites the "colection" stuff with worker presentation:
============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-7.0.1, pluggy-1.0.0
cachedir: (...)
rootdir: (...)
plugins: html-3.1.1, forked-1.4.0, lazy-fixture-0.6.3, logger-0.5.1, qgp-0.4.3, typeguard-2.12.1, timeout-2.0.2, xdist-2.5.0, metadata-1.11.0, repeat-0.9.1
timeout: 150.0s
timeout method: thread
timeout func_only: False
gw0 I / gw1 I / gw2 I / gw3 I / gw4 I / gw5 I / gw6 I / gw7 I / gw8 I / gw9 I / gw10 I / gw11 I / gw12 I / gw13 I / gw14 I / gw15 I / gw16 I / gw17 I / gw18 I / gw19 I / gw20 I / gw21 I / gw22 I / gw23 I
gw0 [3] / gw1 [3] / gw2 [3] / gw3 [3] / gw4 [3] / gw5 [3] / gw6 [3] / gw7 [3] / gw8 [3] / gw9 [3] / gw10 [3] / gw11 [3] / gw12 [3] / gw13 [3] / gw14 [3] / gw15 [3] / gw16 [3] / gw17 [3] / gw18 [3] / gw19 [3] / gw20 [3] / gw21 [3] / gw22 [3] / gw23 [3]
(and the actual tests here)
the overall test count is still available in the sqare braces ([3]), but that last-failed collection stuff is actually useful and would be nice to still have it:
run-last-failure: rerun previous 3 failures (skipped 4 files)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing pytest-xdist's test-session-start output and the worker presentation path when --lf is combined with -n auto. Reproduce the issue with and without xdist, then verify that the run-last-failure summary remains visible alongside the worker and collection output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100