File: test_example_helpers.py

package info (click to toggle)
pytest-check 2.7.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 480 kB
  • sloc: python: 2,220; sh: 17; makefile: 6
file content (22 lines) | stat: -rw-r--r-- 358 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""
Make sure checks can be run in helper functions
and that a walk though of functions from test_something()
to the point of failure is reported.
"""

from pytest_check import check


def test_func():
    helper1()


def helper1():
    helper2()


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