$npx skillfedfor your agent

pytest-arraydiff

pytest plugin to help with comparing array output from tests

Worth itPyPI UtilitiesReleased Jun 2026344.3K downloads / moBSD-3-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_arraydiff-0.7.0-py3-none-any.whl
v0.7.0 · released 2026-06-02 · Python >=3.9 · 2 runtime deps: pytest, numpy

Yes. This is a mature, actively maintained plugin (last release 73 days ago, no vulnerabilities) that solves a real problem in numerical testing. Install friction is minimal, the license is permissive, and it integrates seamlessly into pytest workflows. Recommended for any project with large array outputs that need regression testing.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later; pytest and numpy must be installed.
  • Low friction install with just pytest and numpy as runtime dependencies.
  • The package is actively maintained with a recent release and no known vulnerabilities.

License · maintenance · safety

BSD-3-Clause (permissive) — BSD-3-Clause is a permissive license; you can use this package freely in commercial or private projects with minimal restrictions.

last release 2026-06-02 (73 days) · last repo commit 2026-08-02 · 27 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 344,276 downloads/mo, #7,376 on PyPI

Verify before relying

pip install pytest-arraydiff

import pytest
import numpy as np

@pytest.mark.array_compare
def test_succeeds():
    return np.arange(3 * 5 * 4).reshape((3, 5, 4))

# Generate reference: py.test --arraydiff-generate-path=reference
# Compare against reference: py.test --arraydiff
  • Whether pandas and astropy are optional or required for HDF5 and FITS format support respectively.
  • Performance characteristics when comparing very large arrays or many test files.
Same gist for agents: .md · .json

What it is and what it does

pytest-arraydiff is a pytest plugin that solves the problem of testing code that produces large numerical arrays—arrays too big to hard-code expected values directly in test assertions. Instead of writing `assert_allclose(result, [1, 2, 3])` for megabyte-sized outputs, you mark a test function with `@pytest.mark.array_compare`, have it return a numpy array or pandas DataFrame, and the plugin handles the rest. On first run, you generate reference files in your chosen format (plain text, FITS, or HDF5); on subsequent runs, the plugin compares new outputs to those references within configurable tolerances.

The plugin integrates directly into pytest's test discovery and reporting, so failures show side-by-side diffs of the generated and reference arrays. It's designed for scientific and data-heavy test suites where manual validation of large outputs is impractical, and where you want regression detection without maintaining brittle hard-coded assertions.

Use it for

  • Regression testing for numerical simulation or data processing pipelines that produce large arrays.
  • Validating scientific code outputs (e.g., astronomy, physics, machine learning) against known-good reference data.
  • Testing pandas DataFrame transformations by storing and comparing output DataFrames in HDF5 format.
  • Detecting unintended changes in array-producing functions across refactors or dependency updates.
  • Storing FITS format reference data for astronomical or imaging test suites using astropy.
  • Comparing multi-dimensional numpy arrays with floating-point tolerance thresholds to avoid brittle exact-match tests.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

This is a mature, actively maintained plugin (last release 73 days ago, no vulnerabilities) that solves a real problem in numerical testing. Install friction is minimal, the license is permissive, and it integrates seamlessly into pytest workflows. Recommended for any project with large array outputs that need regression testing.

Install

pytest-arraydiff on PyPI

Before you install

Low friction install with just pytest and numpy as runtime dependencies. The package is actively maintained with a recent release and no known vulnerabilities.

Requires Python 3.9 or later; pytest and numpy must be installed.

License in practice

BSD-3-Clause is a permissive license; you can use this package freely in commercial or private projects with minimal restrictions.

Quickstart

pip install pytest-arraydiff

import pytest
import numpy as np

@pytest.mark.array_compare
def test_succeeds():
    return np.arange(3 * 5 * 4).reshape((3, 5, 4))

# Generate reference: py.test --arraydiff-generate-path=reference
# Compare against reference: py.test --arraydiff

Verify before relying

  • Whether pandas and astropy are optional or required for HDF5 and FITS format support respectively.
  • Performance characteristics when comparing very large arrays or many test files.

Package facts

LicenseBSD-3-Clause permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
pytestnumpy
MaintenanceActively maintained 73 days since the last release
Last repo commit
First released
Downloads344,276 / month, #7,376 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaFramework :: PytestIntended Audience :: DevelopersOperating 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.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: TestingTopic :: Utilities

Evidence: pytest_arraydiff-0.7.0-py3-none-any.whl

Tags

Capabilities
pytest array comparison testingnumpy array regression testingtest output array validationpytest reference file generationarray diff testing pluginnumpy test fixtureslarge array test comparison
Topics
numpy-testingregression-testingscientific-computing

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 array comparison testing”

  • pytest-arraydiffA pytest plugin that generates and compares numpy arrays (and related…
  • pytest-astropyA meta-package that bundles pytest plugins and testing libraries used…
  • pytest-regressionsProvides pytest fixtures for writing regression tests that compare…

Give your agent the search over MCP, or paste the wish link into any chat.

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

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.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

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.

MITpure Python
1.2Bdownloads / mo

See also recursive-diff · pytest-regressions · pytest-filter-subpackage · pytest-excel · pytest-progress · pytest-astropy · numpydantic · datacompy · pyjson · pytest-mpl