ignore failures from flaky tests (pytest plugin)
Project description
pytest-ignore-flaky
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.
pytest compatibility
Tested with pytest 6.2 (2021-04-23).
Project Details
Project code + issue track on github - https://github.com/coherent-oss/pytest-ignore-flaky
license
The MIT License Copyright (c) 2015-2019 Eduardo Naufel Schettino and Marcos Alfredo Camargo Leal Pinto
see LICENSE file
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytest_ignore_flaky-2.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04416f6b2177ef1f2adcb9308a887bf1cf77e7062d71778e404f358d4bbef0c9 |
|
MD5 | a4f9c7816b0afae1703a311cbc731ed7 |
|
BLAKE2b-256 | 248dd3c8b28c46e11b7323424603f335d2e3e9cb3aed9eb6ca51c0227d1f8040 |
Hashes for pytest_ignore_flaky-2.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6af6d4242080336ece1f0e67a0e2520625e37c492434b383ab5c841b385389a3 |
|
MD5 | 332d656a076706266899f7b299d8a0b8 |
|
BLAKE2b-256 | 6c546359cfacce98fdb501fb80a869fda084e1ab88de1b57c6def5f3a8990b1f |