--- id: pytest-tornasync version: "0.6.0.post2" license: http://www.opensource.org/licenses/mit-license.php license_treatment: permissive maintenance: abandoned --- # pytest-tornasync — py.test plugin for testing Python 3.5+ Tornado code License: permissive · Maintenance: abandoned · Downloads: 324.4K/mo ## What it is and what it does pytest-tornasync is a pytest plugin that simplifies testing of Tornado web applications by allowing you to write test functions as plain async def coroutines without decorator boilerplate. Instead of using @pytest.mark.gen_test, you simply name your test function with test_ prefix and define it as async, and the plugin automatically runs it in the Tornado IOLoop. The plugin provides fixtures for common testing scenarios: http_server_client for making requests to a Tornado app under test, http_client for arbitrary HTTP requests, http_server_port for the test server's port, and io_loop for direct IOLoop access. You define an app fixture that returns your tornado.web.Application, and the plugin handles the rest. It targets Tornado 5.0+ and Python 3.5+, though the project is no longer actively maintained. Use it for: - Write async test functions for Tornado web handlers without @pytest.mark.gen_test decorators. - Test HTTP endpoints of a Tornado application using http_server_client fixture. - Verify async coroutine behavior in isolation with direct IOLoop access via the io_loop fixture. - Make external HTTP requests in tests using the http_client fixture. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A pytest plugin that runs native async test functions (defined with async def) against Tornado applications, providing fixtures for HTTP server testing and IO loop management. Yes, if you are testing a Tornado application on Python 3.5–3.7 with pytest and Tornado 5.x. The plugin is stable and has no known vulnerabilities. However, do not use it if you need support for newer Tornado or pytest releases, as the project is abandoned and will not receive updates. For new projects or modern Tornado versions, verify compatibility first or consider alternatives. ## Install pip install pytest-tornasync uv add pytest-tornasync poetry add pytest-tornasync ## Installing pytest-tornasync Before you install: Low install friction with a pure-Python wheel. However, the package is abandoned—last release was 2019-07-15 and last commit 2023-05-24—so it will not receive bug fixes or updates for newer Tornado or pytest versions. License in practice: MIT license (permissive) means you can use this freely in commercial and open-source projects with minimal restrictions. Quickstart: pip install pytest-tornasync import pytest import tornado.web @pytest.fixture def app(): return tornado.web.Application([(r"/", MyHandler)]) async def test_app(http_server_client): resp = await http_server_client.fetch('/') assert resp.code == 200 Requires Python 3.5+ and Tornado 5.0 or newer. Tests must be defined as native coroutines (async def) to be recognized by the plugin. Verify before relying: - Compatibility with Tornado versions released after 2019 and pytest versions beyond those tested in the last release. - Whether the plugin works correctly with modern Python 3.8+ async/await semantics and event loop changes. ## Package facts - License: http://www.opensource.org/licenses/mit-license.php (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 324.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest tornado async testing, tornado test fixtures, async def pytest plugin, tornado http server testing, pytest tornado integration, tornado-testing, async-fixtures [View on SkillFed](https://skillfed.io/packages/pytest-tornasync) · [View on PyPI](https://pypi.org/project/pytest-tornasync/)