{"id":24433,"library":"pytest-mergify","title":"pytest-mergify","description":"A pytest plugin that reports test results to Mergify for merge queue optimization. Current version 2026.4.7.1, requires Python >=3.8. Released frequently (almost daily) with version numbers based on date.","status":"active","version":"2026.4.7.1","language":"python","source_language":"en","source_url":"https://github.com/Mergifyio/pytest-mergify","tags":["pytest","plugin","mergify","ci","merge-queue"],"install":[{"cmd":"pip install pytest-mergify","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required as a plugin for pytest.","package":"pytest","optional":false},{"reason":"Used to send test results to Mergify API.","package":"requests","optional":false}],"imports":[{"note":"The package is imported as a module, but typically used as a pytest plugin via command line option.","symbol":"pytest_mergify","correct":"import pytest_mergify"}],"quickstart":{"code":"import pytest\n\ndef test_example():\n    assert 1 + 1 == 2\n","lang":"python","description":"Write a simple test, then run: `pytest --mergify` or set MERGIFY_TOKEN env var."},"warnings":[{"fix":"Set MERGIFY_TOKEN before running pytest.","message":"The MERGIFY_TOKEN environment variable is required for the plugin to work. Without it, tests will run but results won't be reported.","severity":"gotcha","affected_versions":"all"},{"fix":"Use MERGIFY_TOKEN env var instead of CLI argument.","message":"Older versions used `--mergify-token` CLI argument; newer versions prefer environment variable.","severity":"deprecated","affected_versions":"<2026.0.0"},{"fix":"Ensure Python >= 3.8.","message":"Version 2025.10.0 changed the required Python version from 3.7 to 3.8.","severity":"breaking","affected_versions":">=2025.10.0"},{"fix":"Check network connectivity and verify API endpoint.","message":"The plugin only sends results on test session finish; it may fail silently if network is unavailable.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2026.4.7.1':19 '3.8':22 'almost':25 'base':30 'ci':36 'current':17 'daili':26 'date':32 'frequent':24 'merg':14,38 'merge-queu':37 'mergifi':3,12,35 'number':29 'optim':16 'plugin':6,34 'pytest':2,5,33 'pytest-mergifi':1 'python':21 'queue':15,39 'releas':23 'report':8 'requir':20 'result':10 'test':9 'version':18,28","created_at":"2026-05-01T08:13:03.846465+00:00","updated_at":"2026-05-01T08:13:03.846465+00:00","problems":[{"fix":"Use `pytest --mergify` instead of importing the module.","cause":"The package is installed but not imported correctly; it's a pytest plugin, not a direct import.","error":"ModuleNotFoundError: No module named 'pytest_mergify'"},{"fix":"Remove the CLI argument and set MERGIFY_TOKEN environment variable.","cause":"Using old API with `--mergify-token` where plugin expects env var.","error":"TypeError: __init__() got an unexpected keyword argument 'token'"},{"fix":"Run `pip install pytest-mergify` and ensure it's in the environment.","cause":"The plugin is not installed or not registered in pytest.","error":"pytest: error: unrecognized arguments: --mergify"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2026.5.27.1","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/pytest-mergify/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}