NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2309 most downloaded on PyPI
Randomise the order in which pytest tests are run with some control over the randomness
Last release 1 years ago
22 Jun 2025
Ships unpredictably
gaps range from 2 weeks to 4.0 years
Most releases are documented
notes for 12 of 17 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
17 releases · first in 2016
Dropped support for EOL Python versions and added support for Python 3.13.
2025-06-22
Dropped support for EOL Python versions and added support for Python 3.13.
Fix #58: return in a finally block swallows exceptions and raises a warning in Python 3.14.
Fix error when cacheprovider plugin disabled or missing. Thanks @jhanm12 for reporting and suggesting the fix.
Fix error when cacheprovider plugin disabled or missing. Thanks @jhanm12 for reporting and suggesting the fix.
One column per quarter.
2024-01-20
Fixes #54 - AttributeError when cacheprovider plugin disabled. Thanks @jhanm12
Fixes coexistence with xdist thanks to @matejsp .
Fixes coexistence with xdist thanks to @matejsp.
…cls or module attributes. Thanks @tobywf . * Deprecates none bucket type. * With tox, run tests of pytest-random-order with both pytest 3 and 4.
Fixes randomisation of doctests (#37)
* Fixes issues with doctests reported in #36 - ``class``, ``package`` and ``module`` didn't work because ``DoctestItem`` doesn't have ``cls`` or ``module`` attributes. Thanks @tobywf.
* Deprecates ``none`` bucket type.
* With tox, run tests of pytest-random-order with both pytest 3 and 4.
2018-11-30
Fixes issues with doctests reported in #36 - class, package and module didn't work because DoctestItem doesn't have cls or module attributes. Thanks @tobywf.
Deprecate none bucket type. Update: this was a mistake, it will be kept for backwards compatibility.
With tox, run tests of pytest-random-order with both pytest 3 and 4.
* Fixes compatibility issues with pytest 4.0.0
* Fixes compatibility issues with pytest 4.0.0
* Tests included in the source distribution as requested in #35
2018-11-16
Fixes compatibility issues with pytest 4.0.0, works with pytest 3.0+ as before.
Tests included in the source distribution.
Nothing published for this version
Nothing published for this version
Breaking changes: * Python 3.5+ is required. * Register the plugin as random_order (instead of random-order) * Addresses #32 and perhaps could be usef…
v1.0.0 (#33)
* Rename the Python package (not the PyPI package) to `random_order` so that pytest's `-p` flag usage is consistent.
Breaking changes:
* Python 3.5+ is required.
* Register the plugin as `random_order` (instead of `random-order`)
* Addresses #32 and perhaps could be useful re: #23 -- Plugin is still enabled by default, but randomisation is turned off by default. Can be enabled with any of the options or with the new `--random-order` flag.
2018-10-20
Plugin no longer alters the test order by default. You will have to either 1) pass --random-order, or --random-order-bucket=<bucket>, or --random-order-seed=<seed>, or 2) edit your pytest configuration file and add one of these options there under addopts, or 3) specify these flags in environment variable PYTEST_ADDOPTS.
Python 3.5+ is required. If you want to use this plugin with Python 2.7, use v0.8.0 which is stable and fine if you are happy with it randomising the test order by default.
The name under which the plugin registers itself is changed from random-order (hyphen) to random_order (underscore). This addresses the issue of consistency when disabling or enabling this plugin via the standard -p flag. Previously, the plugin could be disabled by passing -p no:random-order yet re-enabled only by passing -p pytest_random_order.plugin. Now they are -p no:random_order to disable and -p random_order.plugin to enable (The .plugin bit, I think, is required because pytest probably thinks it's an unrelated thing to random_order and import it, yet without it it's the same thing so doesn't import it).
Closes #28 - stops breaking --failed-first flag.
Allow bucketing of test items by their direct parent or grand-parent ( #…
Make it work with pytest-xdist as requested in #22 - generate random order seed during command line argument initialisation so that all processes get
Nothing published for this version
Nothing published for this version
Adds Python 2.6 support. Thanks @eLRuLL
Adds Python 2.6 support. Thanks @eLRuLL
Adds seed support to allow rerunning tests in the same order as in an earlier run
Adds seed support to allow rerunning tests in the same order as in an earlier run
Use standard pytest markers to disable reordering per module or class
Use standard pytest markers to disable reordering per module or class
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →