File: test_example_any_failures.py

package info (click to toggle)
pytest-check 2.7.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 480 kB
  • sloc: python: 2,220; sh: 17; makefile: 6
file content (24 lines) | stat: -rw-r--r-- 535 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""
`any_failures()` can be used to determine if more checks are needed.
"""
from pytest_check import check


def test_any_failures_false():
    check.equal(1, 1)
    check.equal(2, 2)
    if not check.any_failures():
        check.equal(1, 2)
        check.equal(1, 3)
        check.equal(1, 4)


def test_any_failures_true():
    check.equal(1, 1)
    check.equal(2, 3)
    if not check.any_failures():
        check.equal(1, 2)
        check.equal(2, 2)
        check.equal(1, 3)
        check.equal(1, 4)
        check.equal(1, 5)