pytest-dev / pytest-dev/pytest-randomly

Support for Incremental tests by selectively disabling shuffling

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

Nobody has claimed this yet.

Dominant language
Python
Stars
720
Forks
37
Avg merge
6h 16m
Merged PRs (30d)
4

Description

Is it possible to use pytest-randomly but selectively disable shuffling of functions in classes?

Similar to https://github.com/jbasko/pytest-random-order#disable-shuffling-in-module-or-class
This could allow incremental tests, as described in https://docs.pytest.org/en/stable/example/simple.html#incremental-testing-test-steps but still allow some randomness.
In incremental tests where previous functions may depend on prior steps (organized in functions in a class) random order would expectedly fail.

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 comparing the requested behavior with pytest-random-order's selective shuffling example and pytest's incremental-testing documentation. Determine how class-level function shuffling could be disabled while retaining randomness elsewhere, then verify that incremental test steps remain ordered and other tests are still shuffled.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
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.