{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/6"},{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/3"}],"enrichment":{"capability":"A pytest plugin that generates and compares numpy arrays (and related objects like pandas DataFrames) produced during tests against stored reference files, with support for text, FITS, and HDF5 formats.","skillfed_tags":["numpy-testing","regression-testing","scientific-computing"],"use_cases":["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."],"what_it_does":"pytest-arraydiff is a pytest plugin that solves the problem of testing code that produces large numerical arrays\u2014arrays 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.\n\nThe 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.","worth_installing":"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."},"id":"pytest-arraydiff","links":{"html":"https://skillfed.io/packages/pytest-arraydiff","md":"https://skillfed.io/packages/pytest-arraydiff.md","pypi":"https://pypi.org/project/pytest-arraydiff/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-06-02","license_spdx":null,"license_treatment":"permissive","name":"pytest-arraydiff","python_support":"supports_current","summary":"pytest plugin to help with comparing array output from tests"},"popularity":{"monthly_downloads":344276,"position":7376,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.7.0"}
