view pytest.ini @ 6556:a9e776515d8d

tests: add global test_context_fixture Move the existing app_test_context_fixture from test_pullrequests.py to conftest.py to make it available to all test modules. It is useful in two cases: 1. there is test setup code (xUnit style) that needs to execute in the same test context as the actual test. 2. even without test setup code, an entire test needs to be executed in a test context. In this case, the fixture just reduces code complexity by not requiring changes in the test code (compared to standard 'with test_context'). It is possible to apply this (or any) fixture to an entire test class using the class decorator @pytest.mark.usefixtures("...") This is similar to 'autouse=True' but can be used even if the fixture is defined elsewhere.
author Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
date Sun, 15 Jan 2017 20:49:23 +0100
parents d88077fae3d6
children afa5e0bdb76f
line wrap: on
line source

[pytest]
# only look for tests in kallithea/tests
python_files = kallithea/tests/**/test_*.py
addopts =
    # --verbose
    # show extra test summary info as specified by chars (f)ailed, (E)error, (s)skipped, (x)failed, (X)passed, (w)warnings.
    -rfEsxXw
    # Shorter scrollbacks; less stuff to scroll through
    --tb=short