{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/4"}],"enrichment":{"capability":"A pytest plugin that enables testing of Twisted-based asynchronous code by allowing test functions to return Deferred objects and waiting for their completion.","skillfed_tags":["twisted-testing","async-reactor","deferred-support"],"use_cases":["Testing Twisted-based network services and protocol implementations that use Deferred callbacks","Writing async test fixtures that need to wait for Twisted operations before providing test data","Testing Twisted code with async/await syntax using ensureDeferred or async_fixture decorators","Integrating Twisted application tests into a pytest-based test suite alongside synchronous tests","Testing libraries that depend on greenlets and need access to the reactor greenlet context"],"what_it_does":"pytest-twisted is a pytest plugin that bridges the gap between pytest's synchronous test model and Twisted's asynchronous Deferred-based concurrency. It automatically installs a Twisted reactor before tests run and allows test functions to return Deferred objects, which the plugin waits for rather than treating as test failures. The plugin also provides decorators and fixtures for async/await syntax, inline callbacks, and greenlet access, making it possible to write Twisted tests using pytest's standard fixture and assertion machinery.\n\nThe plugin supports multiple reactor implementations (default, asyncio, qt5reactor) and integrates with pytest's fixture system, allowing fixtures to also work with async code. It handles the complexity of reactor lifecycle management so developers can focus on testing their Twisted application logic rather than managing event loop setup and teardown.","worth_installing":"Yes, if you are testing Twisted code. The plugin is actively maintained, has no known vulnerabilities, and low install friction. It solves a real problem\u2014running Twisted's asynchronous code within pytest's synchronous test framework\u2014and is the standard tool for this task. Install it if Twisted is part of your project; skip it otherwise."},"id":"pytest-twisted","links":{"html":"https://skillfed.io/packages/pytest-twisted","md":"https://skillfed.io/packages/pytest-twisted.md","pypi":"https://pypi.org/project/pytest-twisted/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2024-09-10","license_spdx":null,"license_treatment":"permissive","name":"pytest-twisted","python_support":"supports_current","summary":"A twisted plugin for pytest."},"popularity":{"monthly_downloads":285869,"position":8052,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.14.3"}
