tappy (installed as `tap-py`) is a set of Python tools designed for working with the Test Anything Protocol (TAP). It enables Python's unittest framework to produce TAP-formatted output, facilitating integration with other testing systems that consume TAP. The library is currently at version 3.2.1 and maintains an active, though irregular, release cadence to support new Python versions and address bug fixes.
pip install tap-pyVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use `TAPTestRunner` with a standard `unittest.TestCase` to produce TAP output. The `python -m tap` command provides a convenient way to run tests and output TAP directly to the console, similar to `python -m unittest discover`.
Ensure your project is running on Python 3.9 or newer. Upgrade your code to be Python 3 compatible if necessary.
If you relied on `tap-py` for `nose` or `pytest` integration, install `nose-tap` or `pytest-tap` separately (e.g., `pip install pytest-tap`).
Always check the `requires_python` metadata on PyPI or the official documentation. For version 3.2.1, Python 3.9+ is required.
Install `tap-py` with the `yaml` extra: `pip install tap-py[yaml]`.
Change your import statement from `from tap import TAPTestRunner` to `from tap.runner import TAPTestRunner`.
To get TAP output, either use `from tap.runner import TAPTestRunner` in your test runner setup, or simply execute your tests using `python -m tap` in the directory containing your tests.