File: test_pytest_generate_example.py

package info (click to toggle)
python-flaky 3.8.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 332 kB
  • sloc: python: 1,320; makefile: 11; sh: 10
file content (17 lines) | stat: -rw-r--r-- 381 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from flaky import flaky


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


class TestExample:
    _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