File: test_example_tracebackhide.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-- 290 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
"""
helper1() should not be included in traceback
"""

from pytest_check import check


def test_func():
    helper1()


def helper1():
    __tracebackhide__ = True
    helper2()


def helper2():
    with check("first"):
        assert 1 == 0
    with check("second"):
        assert 1 > 2