File: test_example_tb_style.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 (21 lines) | stat: -rw-r--r-- 358 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
"""
Useful for making sure `tb=no` turns off pseudo-traceback.
"""
from pytest_check import check


def run_helper2():
    with check("first fail"):
        assert 1 == 0
    with check("second fail"):
        assert 1 > 2
    with check("third fail"):
        assert 1 < 5 < 4


def run_helper1():
    run_helper2()


def test_failures():
    run_helper1()