Pytest plugin to reverse test order.
Project description
Pytest plugin to reverse test order.
Usage
Install from pip with:
python -m pip install pytest-reverse
Python 3.5 to 3.8 supported.
Pytest will automatically find the plugin and use it when you run pytest. You can reverse test order by passing the --reverse flag:
pytest --reverse
You can make this always apply by adding it to the addopts setting in your pytest.ini (or other configuration file):
[pytest]
addopts = --reverse
History
I’m the creator and maintainer of pytest-randomly, a plugin for randomly ordering tests. @thbde opened an issue there pointing to the paper Empirically revisiting the test independence assumption, which covers test reordering techniques. It turns out that reversal is nearly as effective as randomization.
Test reversal is available in Django’s test runner. I figured such an option or plugin would exist for pytest already, but it didn’t, so I made it here.
History
1.0.1 (2020-04-08)
Run first to avoid interfering with --failed-first flag (docs).
1.0.0 (2020-04-03)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytest_reverse-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9eb2e772c6d4e4283a2d04475f90d0ccb2e5a04a547f845f50189738abc187f |
|
MD5 | a7bf2ae25278ee571c0fa897a5ce91c4 |
|
BLAKE2b-256 | 8423176cec41f0bfe5dd1025904631955dd6fafc64a856e4d4532a90b640ad28 |