pytest-ordering
pytest plugin to run your tests in a specific order
What it is and what it does
pytest-ordering is a pytest plugin that adds markers allowing you to specify the execution order of your tests. You decorate test functions with @pytest.mark.run(order=N) to control when they run relative to other tests, enabling scenarios where one test must run before another or a group of tests must execute in a particular sequence.
The package is abandoned and no longer maintained; the author explicitly directs new users to pytest-order as a replacement. While it remains installable and has no known security vulnerabilities, it has not been updated since 2018 and is not recommended for new projects or ongoing maintenance.
Use it for:
- Ensure a setup test runs before all others and a teardown test runs last in your suite.
- Run integration tests in a specific order when later tests depend on state created by earlier ones.
- Prioritize critical tests to run first, deferring slower or less important tests to the end.
- Enforce a sequence of tests that must execute in order to validate a workflow or data pipeline.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pytest plugin that lets you control the execution order of your tests using markers, running specific tests first, last, or in a defined sequence.
No. The package is abandoned and explicitly superseded by pytest-order. While it has low install friction and no known vulnerabilities, the lack of maintenance since 2018 and the author's own recommendation to use pytest-order make it unsuitable for new projects. Use pytest-order instead.
Install
pytest-ordering on PyPI
pip
pip install pytest-orderinguv
uv add pytest-orderingpoetry
poetry add pytest-orderingInstalling pytest-ordering
Before you install
Installation is straightforward with low friction, but the package is abandoned as of 2018 and has not been maintained for several years. The maintainer explicitly recommends pytest-order as a replacement.
License in practice
Licensed under MIT (permissive), so there are no restrictions on use or redistribution in commercial or private projects.
Quickstart
pip install pytest-ordering
import pytest
@pytest.mark.run(order=1)
def test_first():
assert True
@pytest.mark.run(order=2)
def test_second():
assert True
Requires pytest as a runtime dependency; package is no longer maintained and the author recommends migrating to pytest-order.
Verify before relying
- Compatibility with modern pytest versions (package last released in 2018, last commit 2021-08-25) is unverified.
- Whether the package works reliably with current Python versions beyond those listed in classifiers (Python 2.6–3.3, PyPy).
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pytest |
| Maintenance | abandoned — 2,850 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,754,298/month — #2,905 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_ordering-0.6-py2-none-any.whl; pytest_ordering-0.6-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytest-orderA pytest plugin that lets you control the order…
permissive · top 5,000 on PyPI
pytest_taggingA pytest plugin that lets you tag tests with…
permissive · top 15,000 on PyPI
pytest-isortA pytest plugin that automatically checks…
permissive · top 15,000 on PyPI
pytest-testrailA pytest plugin that integrates test execution…
permissive · top 15,000 on PyPI
pytest-replayA pytest plugin that records test execution…
permissive · top 15,000 on PyPI
pytest-randomlyA pytest plugin that randomly shuffles test…
permissive · top 5,000 on PyPI
pytest-find-dependenciesA pytest plugin that identifies dependencies…
permissive · top 5,000 on PyPI
pytest-integrationA pytest plugin that organizes tests into unit,…
permissive · top 15,000 on PyPI
pytest-jira-xrayA pytest plugin that marks individual tests…
permissive · top 15,000 on PyPI
pytest-catchlogA pytest plugin that automatically captures log…
permissive · top 15,000 on PyPI