pytest-astropy
Meta-package containing dependencies for testing
What it is and what it does
pytest-astropy is a meta-package that installs a curated collection of pytest plugins and testing libraries in one go. Rather than managing individual pytest extensions separately, you install pytest-astropy and get pytest itself, plus plugins for remote data handling, advanced doctesting, array comparison, test filtering, coverage measurement, mocking, slow test marking, and the hypothesis property-based testing library.
It's designed primarily for Astropy and its affiliated packages but works for any Python project. The package is actively maintained, supports Python 3.8 through 3.12, and carries no known security vulnerabilities. Installation is straightforward via pip with low friction.
Use it for:
- Set up a complete testing environment for an Astropy-affiliated package without manually specifying each pytest plugin.
- Add property-based testing via hypothesis to an existing pytest suite alongside standard unit tests.
- Enable remote data file testing and docstring example verification in scientific Python projects.
- Measure test coverage and filter tests by subpackage in a single unified configuration.
- Standardize testing practices across multiple related Python packages by using the same plugin bundle.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A meta-package that bundles pytest plugins and testing libraries used by Astropy and affiliated packages, providing a unified testing toolkit for Python projects.
Yes. This is a low-friction, actively maintained meta-package with no security issues and broad Python version support. Install it if you're working with Astropy, affiliated packages, or any project that would benefit from the bundled testing plugins. The only caveat is verifying that all 10 bundled dependencies align with your project's needs—if you only need a subset, installing individual plugins may be lighter.
Install
pytest-astropy on PyPI
pip
pip install pytest-astropyuv
uv add pytest-astropypoetry
poetry add pytest-astropyInstalling pytest-astropy
Before you install
Low friction install with a wheel distribution. Actively maintained with a recent release 11 days ago and an active repository.
License in practice
Licensed under BSD (permissive), allowing use in most projects without significant restrictions.
Quickstart
pip install pytest-astropy
Then in your test file:
import pytest
# Your tests automatically gain access to all bundled pytest plugins
Requires Python 3.8 or later.
Verify before relying
- Whether the bundled plugins work well together in all use cases or if conflicts can arise between them.
- Performance impact of loading all 10 runtime dependencies for projects that only need a subset.
Package facts
| License | BSD (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 10 — pytest, pytest-doctestplus, pytest-remotedata, pytest-astropy-header, pytest-arraydiff, pytest-filter-subpackage, pytest-cov, pytest-mock, pytest-skip-slow, hypothesis |
| Maintenance | actively maintained — 11 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 303,718/month — #7,810 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_astropy-0.12.0-py3-none-any.whl
Keywords: pytest, remotedata, doctestplus, hypothesis, property-based testing
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-astropy-headerA pytest plugin that automatically includes…
permissive · top 15,000 on PyPI
pytest-filter-subpackageA pytest plugin that adds a `-P` option to run…
permissive · top 15,000 on PyPI
pytest-remotedataA pytest plugin that lets you mark and…
permissive · top 15,000 on PyPI
pytest-mockProvides a pytest fixture that wraps the mock…
permissive · top 1,000 on PyPI
pytest-doctestplusA pytest plugin that runs doctests in Python…
permissive · top 15,000 on PyPI
pytest-arraydiffA pytest plugin that generates and compares…
permissive · top 15,000 on PyPI
pytest-covA pytest plugin that measures code coverage…
permissive · top 1,000 on PyPI
pytest-coverpytest-cover is a pytest plugin for measuring…
permissive · top 15,000 on PyPI
hegel-coreHegel-core provides property-based testing data…
permissive · top 15,000 on PyPI
pytest-seleniumpytest-selenium is a pytest plugin that…
copyleft · top 15,000 on PyPI