Skip to main content

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.

Project Details

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

pytest-ignore-flaky-1.0.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

pytest_ignore_flaky-1.0.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file pytest-ignore-flaky-1.0.0.tar.gz.

File metadata

  • Download URL: pytest-ignore-flaky-1.0.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1

File hashes

Hashes for pytest-ignore-flaky-1.0.0.tar.gz
Algorithm Hash digest
SHA256 29b3099cf4d424fd553d39940f7025acf6847ecbba292649a0dc764dfbb7d59e
MD5 4a8691ce94e0f20768007ecdbd9525a4
BLAKE2b-256 c2c332b3c3a75e450e1ba504071f010ef167f2b6ceef4a57250d33653275a412

See more details on using hashes here.

File details

Details for the file pytest_ignore_flaky-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pytest_ignore_flaky-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1

File hashes

Hashes for pytest_ignore_flaky-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe33a1f725a78e1f92077bfb80926602622bc050a0a71b61c3f1ca7089afb779
MD5 14f3cbf5223533484a522faeb368d0cb
BLAKE2b-256 9bea4264700ace0298cac8b78ae21e6328ba9da5106257af816aecf958b0981e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page