{"id":45914,"library":"pytest-ignore-flaky","title":"pytest-ignore-flaky","description":"A pytest plugin to automatically ignore failures from flaky tests. Current version 2.2.1, requires Python >=3.8. Release cadence is irregular; last update was in 2023.","status":"active","version":"2.2.1","language":"python","source_language":"en","source_url":"https://github.com/coherent-oss/pytest-ignore-flaky","tags":["pytest","plugin","flaky","testing"],"install":[{"cmd":"pip install pytest-ignore-flaky","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required: pytest plugin","package":"pytest","optional":false}],"imports":[{"note":"No common wrong import; the plugin is auto-discovered by pytest.","wrong":"","symbol":"pytest_ignore_flaky","correct":"import pytest_ignore_flaky"}],"quickstart":{"code":"# content of conftest.py or test file\nimport pytest\n\n@pytest.mark.flaky(max_runs=3, min_passes=2)\ndef test_flaky_example():\n    import random\n    assert random.choice([True, False])","lang":"python","description":"Mark a flaky test with @pytest.mark.flaky and specify max_runs (default 3) and min_passes (default 1). The plugin retries the test up to max_runs times, ignoring failures if min_passes is met."},"warnings":[{"fix":"Add the flaky mark to each test you want retried, or use --force-flaky to make all tests flaky.","message":"The plugin only works on tests marked with @pytest.mark.flaky; it does not automatically retry all failing tests.","severity":"gotcha","affected_versions":"all"},{"fix":"In newer versions, use --flaky-ignore instead of --ignore-flaky. Check the output logs carefully.","message":"The --ignore-flaky flag (used to ignore flaky failures) can be dangerous if misused, as it may hide real test failures.","severity":"gotcha","affected_versions":"<2.0.0"},{"fix":"Use --flaky-ignore instead of --ignore-flaky.","message":"The --ignore-flaky command-line option was deprecated in 2.0.0 and replaced with --flaky-ignore.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'2.2.1':17 '2023':29 '3.8':20 'automat':9 'cadenc':22 'current':15 'failur':11 'flaki':4,13,32 'ignor':3,10 'irregular':24 'last':25 'plugin':7,31 'pytest':2,6,30 'pytest-ignore-flaki':1 'python':19 'releas':21 'requir':18 'test':14,33 'updat':26 'version':16","created_at":"2026-06-07T12:57:21.375736+00:00","updated_at":"2026-06-07T12:57:21.375736+00:00","problems":[{"fix":"Use --flaky-ignore instead of --ignore-flaky.","cause":"The --ignore-flaky flag was renamed to --flaky-ignore in version 2.0.0.","error":"Error: pytest: error: unrecognized arguments: --ignore-flaky"},{"fix":"Run 'pip install pytest-ignore-flaky' and ensure the virtual environment is activated.","cause":"The plugin is not installed or not in the Python environment.","error":"ModuleNotFoundError: No module named 'pytest_ignore_flaky'"},{"fix":"Use the decorator as @pytest.mark.flaky(max_runs=3, min_passes=1). Ensure pytest is imported.","cause":"The pytest 'mark' attribute is not used correctly; should be @pytest.mark.flaky.","error":"AttributeError: module 'pytest' has no attribute 'mark'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/coherent-oss/pytest-ignore-flaky","github":"https://github.com/coherent-oss/pytest-ignore-flaky","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"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}}