skillfed

pytest-ordering

pytest plugin to run your tests in a specific order

pytest-ordering v0.6 2.8M downloads/30d#2,905 on PyPI234
Permissive license Abandoned released

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-ordering

uv

uv add pytest-ordering

poetry

poetry add pytest-ordering

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: Utilities

Tags

pytest test orderingrun tests in specific orderpytest execution order controlpytest test sequencingpytest run tests before afterpytest test dependenciescontrol pytest test order
abandonedpytest-plugin

More Utilities packages