pytest-unordered
Test equality of unordered collections in pytest
Decision gist · record as of 2026-08-14
Yes. This is a focused, well-maintained tool that solves a real testing pain point with minimal friction. No security issues, permissive license, active development, and low dependency overhead make it a safe addition to any pytest-based test suite.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with only pytest as a runtime dependency.
- Actively maintained with recent releases; last commit 2026-06-16.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in your own projects.
last release 2026-06-16 (59 days) · last repo commit 2026-06-16 · 57 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 10,998,579 downloads/mo, #1,421 on PyPI
Alternatives
Verify before relying
pip install pytest-unordered
from pytest_unordered import unordered
assert [1, 20, 300] == unordered([20, 300, 1])What it is and what it does
pytest-unordered is a pytest plugin that adds an `unordered()` wrapper function for assertions that compare collection contents while ignoring element order. It solves the common testing problem where APIs return data structures (lists, tuples, nested objects) in unpredictable or arbitrary order, making naive equality assertions fragile and test code verbose.
The package shines when testing complex nested data structures: you can wrap only the parts where order doesn't matter, leaving other parts under strict order checking. It handles dictionaries, lists, tuples, and generators, and supports both container-type-strict and container-type-agnostic comparison modes. The single runtime dependency is pytest itself, making installation and integration straightforward.
Use it for
- Test REST API responses that return lists of objects in unpredictable order without writing custom comparison logic.
- Assert nested data structures (e.g., customer records with order lists) where only some levels should ignore order.
- Compare collections of dictionaries or other unhashable types where set() or sorted() approaches fail.
- Verify database query results or GraphQL responses that don't guarantee result ordering.
- Write readable, maintainable assertions for complex JSON payloads in integration tests.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is a focused, well-maintained tool that solves a real testing pain point with minimal friction. No security issues, permissive license, active development, and low dependency overhead make it a safe addition to any pytest-based test suite.
Install
pytest-unordered on PyPI
Before you install
Low friction: pure Python wheel with only pytest as a runtime dependency. Actively maintained with recent releases; last commit 2026-06-16.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution in your own projects.
Quickstart
pip install pytest-unordered
from pytest_unordered import unordered
assert [1, 20, 300] == unordered([20, 300, 1])
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepytest |
| Maintenance | Actively maintained 59 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 10,998,579 / month, #1,421 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: LibrariesTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: UtilitiesTyping :: Typed |
Evidence: pytest_unordered-0.8.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pytest unordered collection comparison”
- pytest-unorderedProvides a pytest assertion helper to compare collections by content…
- pytest-doctestplusA pytest plugin that runs doctests in Python docstrings and…
- pytest-astropyA meta-package that bundles pytest plugins and testing libraries used…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also re-assert · dirty-equals · anys · pytest-insta · pytest-assume · asserts · pytest-deepassert · pytest-check · pyspark-test · pytest-schema