pytest-dev / pytest-dev/pytest-forked

Fork per subpath

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

Nobody has claimed this yet.

Dominant language
Python
Stars
83
Forks
29
PR merge metrics
No merged PRs in 30d

Description

The --forked option add a lot of time overhead. In our project structure (monorepo) we are running into global state conflicts between conftest.py of different packages and other global state issues between these packages but testing every package isolated from each other is not an issue.

It would be nice if one could define a path with regex and pytest-forked would then only fork per found subpath.

For example

  • compontents/* Fork per folder in components
  • **/tests Fork per tests folder

This way we could get the usual speed but isolate package tests from each other in subprocesses.

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 reading the existing --forked option and how pytest-forked determines subprocess boundaries. Define how a configured path regex should group test paths and preserve isolation between matched subpaths, then add coverage for patterns such as components/* and **/tests while checking that the normal forked behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.