{"library":"pytest-tagging","title":"Pytest Tagging","description":"pytest-tagging is an active pytest plugin, currently at version 1.6.0, designed to simplify test categorization by allowing users to tag tests with arbitrary strings without the need for explicit marker registration. It enhances pytest's built-in capabilities, enabling granular selection and exclusion of tests based on these tags, and providing summary statistics like failed test counts per tag. The library typically sees several minor or patch releases per year, indicating active maintenance.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install pytest-tagging"],"cli":null},"imports":["import pytest\n\n@pytest.mark.tags(\"smoke\", \"api\")\ndef test_critical_api():\n    assert True"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pytest\n\n# Tagging a test function\n@pytest.mark.tags(\"smoke\", \"login\")\ndef test_successful_login():\n    assert 1 == 1\n\n# Tagging a whole test class\n@pytest.mark.tags(\"regression\")\nclass TestUserProfile:\n    def test_view_profile(self):\n        assert True\n\n    @pytest.mark.tags(\"critical\")\n    def test_update_profile(self):\n        assert False # This test is expected to fail for demonstration\n","lang":"python","description":"Create a file named `test_example.py` with the content above. Then, run pytest from your terminal using the `--tags` option to select tests. You can combine tags with 'and', 'or', and 'not' logic. To run tests tagged 'smoke' or 'login', use `pytest --tags \"smoke or login\"`. To run tests tagged 'regression' but *not* 'critical', use `pytest --tags \"regression not critical\"`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}