File: test_pytest_generate_example.py

package info (click to toggle)
python-flaky 3.3.0-1~bpo8%2B1
  • links: PTS
  • area: main
  • in suites: jessie-backports
  • size: 388 kB
  • sloc: python: 1,947; makefile: 6
file content (20 lines) | stat: -rw-r--r-- 446 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# coding: utf-8

from __future__ import unicode_literals
from flaky import flaky


@flaky
def test_something_flaky(dummy_list):
    dummy_list.append(0)
    assert len(dummy_list) > 1


class TestExample(object):
    _threshold = -1

    @flaky
    def test_flaky_thing_that_fails_then_succeeds(self, dummy_list):
        # pylint:disable=unused-argument,no-self-use
        TestExample._threshold += 1
        assert TestExample._threshold >= 1