File: test_fail_in_fixture.py

package info (click to toggle)
pytest-check 2.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 432 kB
  • sloc: python: 1,775; sh: 17; makefile: 6
file content (12 lines) | stat: -rw-r--r-- 536 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
def test_setup_failure(pytester):
    pytester.copy_example("examples/test_example_fail_in_fixture.py")
    result = pytester.runpytest("-k", "test_setup_failure")
    result.assert_outcomes(errors=1)
    result.stdout.fnmatch_lines(["* check.equal(1, 2)*"])


def test_teardown_failure(pytester):
    pytester.copy_example("examples/test_example_fail_in_fixture.py")
    result = pytester.runpytest("-k", "test_teardown_failure")
    result.assert_outcomes(passed=1, errors=1)
    result.stdout.fnmatch_lines(["* check.equal(1, 2)*"])