
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
.. image:: https://img.shields.io/pypi/v/pytest-ignore-flaky.svg :target: https://pypi.org/project/pytest-ignore-flaky
.. image:: https://img.shields.io/pypi/pyversions/pytest-ignore-flaky.svg
.. image:: https://github.com/coherent-oss/pytest-ignore-flaky/actions/workflows/main.yml/badge.svg :target: https://github.com/coherent-oss/pytest-ignore-flaky/actions?query=workflow%3A%22tests%22 :alt: tests
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json :target: https://github.com/astral-sh/ruff :alt: Ruff
.. image:: https://readthedocs.org/projects/pytest-ignore-flaky/badge/?version=latest :target: https://pytest-ignore-flaky.readthedocs.io/en/latest/?badge=latest
.. image:: https://img.shields.io/badge/skeleton-2024-informational :target: https://blog.jaraco.com/skeleton
ignore failures from flaky tests (pytest plugin)
A "flaky" test is a test that usually pass but sometimes it fails. You should always avoid flaky tests but not always possible.
This plugin can be used to optionally ignore failures from flaky tests.
First "mark" your tests with the flaky
marker::
import random import pytest
@pytest.mark.flaky def test_mf(): assert 0 == random.randint(0, 1)
By default this mark is just ignored, unless the plugin is activated from the
command line (or py.test
config file)::
py.test --ignore-flaky
If a flaky test pass it will be reported normally as test succeed.
If the test fails, instead of being reported as failure it will be reported as
a xfail
.
Tested with pytest 6.2 (2021-04-23).
The MIT License Copyright (c) 2015-2019 Eduardo Naufel Schettino and Marcos Alfredo Camargo Leal Pinto
see LICENSE file
FAQs
ignore failures from flaky tests (pytest plugin)
We found that pytest-ignore-flaky demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.