{"id":8541,"library":"pytest-tap","title":"pytest-tap","description":"pytest-tap is a reporting plugin for pytest that outputs Test Anything Protocol (TAP) data. TAP is a line-based test protocol for recording test data in a standard way. The current version is 3.5, and it regularly releases new versions to maintain compatibility with updated Python and pytest versions, typically on an irregular cadence.","status":"active","version":"3.5","language":"python","source_language":"en","source_url":"https://github.com/python-tap/pytest-tap","tags":["pytest","tap","testing","plugin","test-anything-protocol"],"install":[{"cmd":"pip install pytest-tap","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Required testing framework as pytest-tap is a plugin for pytest.","package":"pytest","optional":false}],"imports":[],"quickstart":{"code":"import pytest\n\n# test_example.py\ndef test_passing_example():\n    assert 1 + 1 == 2\n\ndef test_failing_example():\n    assert 'hello'.upper() == 'WORLD'\n\ndef test_skipped_example():\n    pytest.skip(\"This test is intentionally skipped\")\n\n# To run: pytest --tap test_example.py\n# This will output TAP data to stdout.","lang":"python","description":"Create a test file (e.g., `test_example.py`) and run pytest with the `--tap` flag to see TAP output. The plugin integrates directly with pytest's command-line interface."},"warnings":[{"fix":"Replace `--tap-stream` with `--tap` when running pytest.","message":"The `--tap-stream` command-line flag was deprecated in version 3.4 in favor of the simpler `--tap` flag for streaming TAP output.","severity":"deprecated","affected_versions":">=3.4"},{"fix":"Always include a TAP output mode flag when running pytest, such as `--tap` (for streaming), `--tap-files` (for individual files), or `--tap-combined` (for a single combined file).","message":"The `pytest-tap` plugin is automatically activated upon installation, but it does not produce any output by default. You must explicitly enable a TAP output mode using one of the command-line flags.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure your Python environment meets the `requires_python` specification (currently `>=3.9`) and use a compatible version of `pytest`.","message":"Support for older Python versions is regularly dropped to align with Python's end-of-life schedule and pytest's support. For example, Python 3.8 support was dropped in `pytest-tap` v3.5, and Python 3.7/3.6 were dropped in v3.4.","severity":"breaking","affected_versions":">=3.4"}],"env_vars":null,"search_vec":"'3.5':40 'anyth':16,67 'base':25 'cadenc':60 'compat':49 'current':37 'data':19,31 'irregular':59 'line':24 'line-bas':23 'maintain':48 'new':45 'output':14 'plugin':10,64 'protocol':17,27,68 'pytest':2,5,12,54,61 'pytest-tap':1,4 'python':52 'record':29 'regular':43 'releas':44 'report':9 'standard':34 'tap':3,6,18,20,62 'test':15,26,30,63,66 'test-anything-protocol':65 'typic':56 'updat':51 'version':38,46,55 'way':35","created_at":"2026-04-16T17:02:43.674530+00:00","updated_at":"2026-04-16T17:02:43.674530+00:00","problems":[{"fix":"Update your pytest command to use `--tap` instead of `--tap-stream` for streaming TAP output.","cause":"Using the `--tap-stream` flag, which was deprecated in `pytest-tap` version 3.4.","error":"DeprecationWarning: '--tap-stream' is deprecated, use '--tap' instead."},{"fix":"Add a TAP output flag to your pytest command, such as `pytest --tap`, `pytest --tap-files`, or `pytest --tap-combined`.","cause":"The `pytest-tap` plugin is installed, but no explicit TAP output mode was specified on the command line.","error":"No TAP output is generated to stdout or in files, even though pytest runs successfully."},{"fix":"Run `pip install pytest-tap` in your Python environment. Also, ensure your test files follow pytest's discovery conventions (e.g., `test_*.py` files, `test_*` functions).","cause":"The `pytest-tap` library is not installed in the active Python environment, or the environment where `pytest` is running cannot find it.","error":"ModuleNotFoundError: No module named 'pytest_tap'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/pytest-tap/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-04-16","next_check":"2026-07-15","install_tag":null}}