pytest-celery
Pytest plugin for Celery
Decision gist · record as of 2026-08-14
Yes, if you are testing a Celery application. pytest-celery is the official plugin, actively maintained, production-stable, and has no known vulnerabilities. The Docker-based testing approach (1.0.0+) is a significant enhancement for production-like validation. Low install friction and permissive licensing make it a straightforward choice for any Celery project.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Docker must be installed and running; requires Python 3.9 or later.
- Low friction install with a pure-Python wheel.
- Actively maintained with recent commits and production-stable status.
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause is permissive and imposes no restrictions on use or redistribution; safe for commercial and open-source projects alike.
last release 2026-03-02 (165 days) · last repo commit 2026-08-10 · 82 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,859,167 downloads/mo, #3,485 on PyPI
Alternatives
Verify before relying
pip install pytest-celery
import pytest
from pytest_celery import celery_app, celery_worker
def test_celery_task(celery_app, celery_worker):
# Use fixtures to test Celery tasks
pass- Whether the Docker-based approach requires specific Docker daemon configuration or network setup beyond standard Docker installation.
- Performance characteristics and overhead of Docker-based testing compared to traditional unit tests.
What it is and what it does
pytest-celery is the official testing plugin for Celery, the distributed task queue framework. It provides pytest fixtures and utilities to test Celery applications in two modes: traditional unit and integration testing via the celery.contrib.pytest API, and a newer Docker-based approach (introduced in version 1.0.0+) for smoke and production-like testing. The Docker-based methodology lets you spin up isolated Celery workers and brokers in containers, making it possible to test your tasks and application logic in environments that closely mirror production without affecting existing tests.
The plugin depends on celery, docker, kombu, debugpy, psutil, tenacity, and pytest-docker-tools. It supports Python 3.9 through 3.14 and is actively maintained. The low-friction install and production-stable status make it a straightforward addition to Celery-based projects that need comprehensive test coverage.
Use it for
- Test Celery tasks in isolated Docker containers to verify behavior in production-like conditions before deployment.
- Write integration tests that spin up temporary Celery workers and brokers to validate task execution and message flow.
- Debug Celery application issues by running tests with debugpy attached to worker processes inside containers.
- Validate task retries, error handling, and signal handlers in a controlled Docker environment.
- Test multiple Celery workers and broker configurations without manual setup or teardown.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are testing a Celery application.
pytest-celery is the official plugin, actively maintained, production-stable, and has no known vulnerabilities. The Docker-based testing approach (1.0.0+) is a significant enhancement for production-like validation. Low install friction and permissive licensing make it a straightforward choice for any Celery project.
Install
pytest-celery on PyPI
Before you install
Low friction install with a pure-Python wheel. Actively maintained with recent commits and production-stable status. Depends on celery, docker, and pytest-docker-tools, which are standard testing dependencies.
Docker must be installed and running; requires Python 3.9 or later.
License in practice
BSD-3-Clause is permissive and imposes no restrictions on use or redistribution; safe for commercial and open-source projects alike.
Quickstart
pip install pytest-celery
import pytest
from pytest_celery import celery_app, celery_worker
def test_celery_task(celery_app, celery_worker):
# Use fixtures to test Celery tasks
pass
Verify before relying
- Whether the Docker-based approach requires specific Docker daemon configuration or network setup beyond standard Docker installation.
- Performance characteristics and overhead of Docker-based testing compared to traditional unit tests.
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release <4.0,>=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 7 packagescelerydebugpydockerkombupsutilpytest-docker-toolstenacity |
| Maintenance | Actively maintained 165 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,859,167 / month, #3,485 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: CeleryLicense :: OSI Approved :: BSD 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.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Testing |
Evidence: pytest_celery-1.3.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 plugin for celery”
- pytest-celerypytest-celery is the official pytest plugin for Celery that enables…
- pylint-celeryA Pylint plugin that improves static analysis of Celery code by…
- aa-taskmonitorA Django admin plugin for Alliance Auth that logs, searches, and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
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.
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.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also celery · celery-stubs · opentelemetry-instrumentation-celery · apache-airflow-providers-celery · flower · pylint-celery · aa-taskmonitor · dvc-task · celery-batches · celery-progress