File: test_example_alt_names.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 (28 lines) | stat: -rw-r--r-- 564 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
25
26
27
28
"""
By default, pytest looks for functions that START with test_
However, it's possible to also look for alternate names, such as
functions ENDING with _test.

To run this example,
- use:
 pytest python_functionspytest
       -o "python_functions=test_* *_test"
       test_example_alt_names.py`

The purpose of this example is to make sure that `check`
works with alternately named tests.
"""
from pytest_check import check


def ends_with_test():
    helper_func()


def test_default_naming():
    pass


def helper_func():
    with check:
        assert 1 == 0