pytest-dev / pytest-dev/pytest-xdist

looponfail output issues w/ looponfailroots

Open
#51 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

when using xdist "-f, --looponfail" and large number of "looponfailroots" folders is set, output in shell is almost useless because you need to scroll each time something changes.

example output, some content removed:

### LOOPONFAILING ###
unit/test_...
### waiting for changes ###
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...
### Watching:   ...

a somewhat expected response would be to set less roots and rearrange project or that i'm doing something wrong.
here is a simple example why this is irrelevant:
a project using python and javascript can have various workers generating data and logs which all trigger looponfail.

possible solutions:

  • allow regex(s) to specify which files/folders should be watched
  • display "Watching ..." for looponfailroots only once when "py.test -f" starts

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

Start by reproducing the shell output with pytest-xdist's -f/--looponfail option and many looponfailroots folders. Compare the proposed filtering and one-time display approaches, then verify that loop-on-failure output remains useful when multiple project workers generate watched files.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.