pytest-tornado
A py.test plugin providing fixtures and markers to simplify testing of asynchronous tornado applications.
Decision gist · record as of 2026-08-14
Yes, if you are actively testing a Tornado application and want pytest integration—it eliminates boilerplate for IOLoop and server setup. However, be cautious: the project is abandoned (last release June 2020, no commits since). It works for current Tornado and pytest versions, but you should monitor compatibility and be prepared to fork or switch if breaking changes occur in either dependency. No security vulnerabilities are known.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires pytest and tornado to be installed; gen_test tests default to a 5-second timeout (configurable via ASYNC_TEST_TIMEOUT environment variable or marker argument).
- Low install friction with a pure-Python wheel.
- However, the package is abandoned—last release was 2020-06-17 and no commits since then.
License · maintenance · safety
Apache License, Version 2.0 (permissive) — Licensed under Apache License 2.0 (permissive), so you can use, modify, and distribute it freely with minimal restrictions. No license-based barriers to adoption.
last release 2020-06-17 (2249 days) · last repo commit 2020-06-17 · 118 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 378,257 downloads/mo, #7,119 on PyPI
Alternatives
Verify before relying
pip install pytest-tornado
import pytest
import tornado.web
@pytest.fixture
def app():
return tornado.web.Application([(r"/", MyHandler)])
@pytest.mark.gen_test
def test_example(http_client, base_url):
response = yield http_client.fetch(base_url)
assert response.code == 200- Compatibility with current pytest and Tornado major versions (last tested 2020-06-17)
- Whether async/await syntax support is fully stable across all test patterns
- HTTPS testing prerequisites and certificate handling details
What it is and what it does
pytest-tornado is a pytest plugin that bridges the gap between pytest's synchronous test model and Tornado's asynchronous event loop. It provides fixtures (io_loop, http_server, http_client, base_url, http_port) and a gen_test marker that let you write tests for Tornado web applications using both generator-based coroutines (yield) and modern async/await syntax. The plugin manages the IOLoop lifecycle per test, spins up temporary HTTP/HTTPS servers, and handles timeouts automatically.
You define a Tornado application as a pytest fixture, then write test functions marked with @pytest.mark.gen_test that can yield or await HTTP requests. The plugin injects fixtures like http_client and base_url so your test can make requests to the test server and verify responses. It also supports HTTPS testing when you provide an ssl_options fixture.
Use it for
- Test Tornado RequestHandler classes by making HTTP requests through http_client and verifying response codes and body content.
- Write async integration tests that exercise both client and server concurrently using run_sync=False to keep them on the same IOLoop.
- Validate HTTPS endpoints by providing ssl_options and using https_server and https_client fixtures.
- Test WebSocket handlers and other async Tornado features that require a running IOLoop and real HTTP server.
- Migrate legacy Tornado test suites from older test runners to pytest while preserving async test patterns.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are actively testing a Tornado application and want pytest integration—it eliminates boilerplate for IOLoop and server setup.
However, be cautious: the project is abandoned (last release June 2020, no commits since). It works for current Tornado and pytest versions, but you should monitor compatibility and be prepared to fork or switch if breaking changes occur in either dependency. No security vulnerabilities are known.
Install
pytest-tornado on PyPI
Before you install
Low install friction with a pure-Python wheel. However, the package is abandoned—last release was 2020-06-17 and no commits since then. It remains marked Production/Stable and has seen no security issues, but you should expect no maintenance for compatibility with newer pytest or Tornado versions.
Requires pytest and tornado to be installed; gen_test tests default to a 5-second timeout (configurable via ASYNC_TEST_TIMEOUT environment variable or marker argument).
License in practice
Licensed under Apache License 2.0 (permissive), so you can use, modify, and distribute it freely with minimal restrictions. No license-based barriers to adoption.
Quickstart
pip install pytest-tornado
import pytest
import tornado.web
@pytest.fixture
def app():
return tornado.web.Application([(r"/", MyHandler)])
@pytest.mark.gen_test
def test_example(http_client, base_url):
response = yield http_client.fetch(base_url)
assert response.code == 200
Verify before relying
- Compatibility with current pytest and Tornado major versions (last tested 2020-06-17)
- Whether async/await syntax support is fully stable across all test patterns
- HTTPS testing prerequisites and certificate handling details
Package facts
| License | Apache License, Version 2.0 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagespytesttornadosetuptools |
| Maintenance | Abandoned 2,249 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 378,257 / month, #7,119 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/StableEnvironment :: PluginsIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: Software DevelopmentTopic :: Software Development :: Testing |
Evidence: pytest_tornado-0.8.1-py2.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 › “tornado web app testing”
- pytest-tornadoA pytest plugin that provides fixtures and markers to test…
- pytest-tornasyncA pytest plugin that runs native async test functions (defined with…
- swagger-ui-pyIntegrates Swagger UI documentation into Python web frameworks…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also pytest-tornasync · threadloop · tornado · pytest-twisted · terminado · pytest-aio · sanic-testing · pytest-fail-slow · pytest-timeout · pytest-markdown-docs