NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2810 most downloaded on PyPI
Pytest plugin for Celery
Last release 7 months ago
02 Mar 2026
Release timing varies
gaps range from 1 weeks to 7 months
Nearly every release is documented
notes for 9 of 10 stable releases
12 versions withdrawn
withdrawn after publishing
6 years old
30 releases · first in 2020
One column per quarter.
Reverted pycurl removal to match celery/kombu v5.6 SQS transport.
CeleryTestCluster.poetry update --with test,dev,ci,docs) by @Nusnus in #469Full Changelog: v1.2.1...v1.3.0
Fixed spelling REDUCTED -> REDACTED, found by codespell by @Avev in #446
worker Dockerfile image to bookworm by @LeoTheMighty in #460Full Changelog: v1.2.0...v1.2.1
Fixed Python 3.8 compatibility issues.
Full Changelog: v1.1.3...v1.2.0
Fixed issues when using Redis as a backend.
Fixed issues when using Redis as a backend.
Full Changelog: v1.1.2...v1.1.3
Fixed Redis container instabilities in #405
Fixed Redis container instabilities in #405
Full Changelog: v1.1.1...v1.1.2
Added installation markers for pycurl by @Nusnus in #378
New SQS broker using Localstack (Disabled by default).
sqs extra for the SQS broker.Full Changelog: v1.0.1...v1.1.0
CVE-2024-39689 : Certifi removes GLOBALTRUST root certificate
Full Changelog: v1.0.0...v1.0.1
User Manual : https://pytest-celery.readthedocs.io/en/latest/ PyPI : https://pypi.org/project/pytest-celery/ Source : https://github.com/celery/pytest
User Manual: https://pytest-celery.readthedocs.io/en/latest/
PyPI: https://pypi.org/project/pytest-celery/
Source: https://github.com/celery/pytest-celery/
Install with pip install -U "pytest-celery[all]".
The plugin provides a single entry point to the test case and makes sure everything is configured according to the selected architecture and requirements.
By default, all of the supported architecture components are added to a matrix of all possible combinations.
Pytest will generate a test case for each combination, and will run it in an isolated environment.
This allows separation of concerns, and makes it simple to access different architectures in a single test case, for example:
def test_hello_world(celery_setup: CeleryTestSetup):
assert celery_setup.ready()
This code will generate test cases for all possible combinations of the supported brokers and backends, using the latest
version of Celery. Under the context of the test, each combination will be available as a celery_setup fixture,
with access to all of the required components, and will run in an isolated environment.
The plugin is highly configurable, and can be used to test a wide range of Celery architectures.
It can be configured to use a specific version of Celery, or to use a specific version of a broker or backend.
It can also be configured to use a custom broker or backend, or to use a custom Celery application.
For basic usage, the plugin provides default components that can be configured and extended.
For more advanced use cases, the plugin uses the pytest fixtures mechanism to allow injecting custom components into the environment and build a custom Celery architecture for your project.
For example, see the rabbitmq-management example, which demonstrates how to replace the default broker matrix with a single RabbitMQ Management broker.
The plugin is designed to run tests in parallel using isolated environments. It supports the pytest-xdist plugin to run tests in parallel and scales well with available resources to improve the overall test suite performance.
The codebase is fully annotated with type hints and is tested with mypy to ensure type safety across the board, allowing for a better development experience.
Workers
Brokers
Backends
Clusters
By default, a set of predefined components is used to build the Celery architecture for each test.
Each built-in component can be either configured or completely replaced with a custom implementation.
Architecture Injection can be done at different layers, and can be used to replace only specific elements of the architecture pipeline, or to replace the entire pipeline altogether.
The plugin uses docker containers to build the Celery architecture for each test.
This means that the plugin is not limited to specific versions and can be used to test potentially any Celery setup.
It uses the pytest-docker-tools plugin to manage the docker containers which is useful for accessing the docker containers in the test case during the test run and assert on their state with high granularity.
The plugin provides a set of built-in components that can be used to test ideas quickly.
You can start with the default settings and gradually modify the configurations to fine-tune the test environment. By focusing on the test case, you can quickly iterate and test ideas, without wasting time on the overhead of setting up different environments manually.
One of the challenges in testing production Celery applications is the need to inject testing infrastructure into the Celery worker container at runtime. The plugin provides a Code Generation mechanism that can be used to inject code into the Celery worker container at runtime according to the test case. This opens the door to a wide range of testing scenarios, and allows higher level of control over the tested Celery application.
Each test case is executed in an isolated environment. This means that each test case has its own Celery architecture, and is not affected by other test cases. Tests may run in parallel and take care of tearing down themselves when they are done, regardless of the test result.
The plugin is designed to enhance testing capabilities by treating tests as first-class citizens. It uses advanced mechanisms to encapsulate the complexity of setting up a Celery environment, thus allowing the developer to focus on the test case itself and leave the hard lifting to the plugin.
The plugin is designed to be extensible to fit a wide range of use cases and provides a set of built-in components that can be extended to fit more advanced use cases.
It's based on the S.O.L.I.D principles and provides APIs for developing high-quality test suites. It combines the sophistication of the pytest fixtures mechanism with OOP principles to create separation of concerns between each layer of the infrastructure and its elements, which allow a higher level of granularity and control when extending the plugin.
Full Changelog: v1.0.0rc4...v1.0.0
Improved the celery bug report doc by @Nusnus in #272
Full Changelog: v1.0.0rc3...v1.0.0rc4
Hotfix: Enhanced celery bug report snippets by @Nusnus in https://github.com/celery/pytest-celery/pull/267
Full Changelog: https://github.com/celery/pytest-celery/compare/v1.0.0rc2...v1.0.0rc3
Fixed CD by @Nusnus in https://github.com/celery/pytest-celery/pull/257
Full Changelog: https://github.com/celery/pytest-celery/compare/v1.0.0rc1...v1.0.0rc2
After so long, the first release candidate for v1.0.0 !
After so long, the first release candidate for v1.0.0 !
gevent and solo pools.In addition, the documentation provides a new way to report a Celery bug, which will be integrated into the standard bug report template at a later stage: Standalone Celery Bug Report.
Lastly, from now on, the release dates for the plugin will be described on the Milestones page.
Full Changelog: https://github.com/celery/pytest-celery/compare/v1.0.0b4...v1.0.0rc1
Bump mypy from 1.8.0 to 1.9.0 by @dependabot in https://github.com/celery/pytest-celery/pull/234
Full Changelog: https://github.com/celery/pytest-celery/compare/v1.0.0b3...v1.0.0b4
The celery package is now installed by default again, reverting the decision from v1.0.0b2.
The celery package is now installed by default again, reverting the decision from v1.0.0b2.
To install the plugin in your environment, please follow the new Advanced Installation Guide.
Full Changelog: https://github.com/celery/pytest-celery/compare/v1.0.0b2...v1.0.0b3
Fixed pip deprecation warning about egg fragment with a non-PEP 508 name by @Nusnus in https://github.com/celery/pytest-celery/pull/173
Celery is no longer installed by default. Install manually in your test environment, or use the “celery” extra.
Full Changelog: https://github.com/celery/pytest-celery/compare/v1.0.0b1...v1.0.0b2
First beta version! Featuring the MVP requirements for Celery’s new smoke tests.
First beta version! Featuring the MVP requirements for Celery’s new smoke tests.
Fixed Installation Errors by @Nusnus in https://github.com/celery/pytest-celery/pull/144
Full Changelog: https://github.com/celery/pytest-celery/compare/v1.0.0a11...v1.0.0a12
There was an issue installing from PyPI (using —pre). It is finally working.
There was an issue installing from PyPI (using —pre). It is finally working.
Can be installed with pip install —pre pytest-celery or pip install pytest-celery==1.0.0a11
Full Changelog: https://github.com/celery/pytest-celery/compare/v1.0.0a10...v1.0.0a11
Prepare for (pre) release: v1.0.0a10 by @Nusnus in https://github.com/celery/pytest-celery/pull/141
Full Changelog: https://github.com/celery/pytest-celery/compare/v1.0.0a9...v1.0.0a10
Prepare for (pre) release: v1.0.0a9 by @Nusnus in https://github.com/celery/pytest-celery/pull/140
Full Changelog: https://github.com/celery/pytest-celery/compare/v1.0.0a8...v1.0.0a9
Prepare for (pre) release: v1.0.0a8 by @Nusnus in https://github.com/celery/pytest-celery/pull/139
Full Changelog: https://github.com/celery/pytest-celery/compare/v1.0.0a7...v1.0.0a8
Prepare for (pre) release: v1.0.0a7 by @Nusnus in https://github.com/celery/pytest-celery/pull/138
Full Changelog: https://github.com/celery/pytest-celery/compare/v1.0.0a6...v1.0.0a7
Prepare for (pre) release: v1.0.0a6 by @Nusnus in https://github.com/celery/pytest-celery/pull/137
Full Changelog: https://github.com/celery/pytest-celery/compare/v1.0.0a5...v1.0.0a6
Cleanup by @Nusnus in https://github.com/celery/pytest-celery/pull/117
Full Changelog: https://github.com/celery/pytest-celery/compare/v1.0.0a4...v1.0.0a5
[pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/celery/pytest-celery/pull/107
Full Changelog: https://github.com/celery/pytest-celery/compare/1.0.0a3...1.0.0a4
This release aims to increase the scope of availability for the alpha version to confirm readiness for the next stage (beta). It is released for techn
This release aims to increase the scope of availability for the alpha version to confirm readiness for the next stage (beta). It is released for technical reasons (e.g., checking automatic CI/CD workflow).
This is an alpha pre-release!
Full Changelog: https://github.com/celery/pytest-celery/compare/1.0.0a2...1.0.0a3
The purpose of this release to to test the automatic CD to PyPI. The expected result is that deploy.yml will be triggered automatically from publishin
The purpose of this release to to test the automatic CD to PyPI.
The expected result is that deploy.yml will be triggered automatically from publishing the release via the GitHub UI and publish to PyPI.
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →