ionelmc/python-nameless

View on GitHub
pytest.ini

Summary

Maintainability
Test Coverage
[pytest]
# If a pytest section is found in one of the possible config files
# (pytest.ini, tox.ini or setup.cfg), then pytest will not look for any others,
# so if you add a pytest config section elsewhere,
# you will need to delete this section from setup.cfg.
norecursedirs =
    .git
    .tox
    .env
    dist
    build
    migrations

python_files =
    test_*.py
    *_test.py
    tests.py
addopts =
    -ra
    --strict-markers
    --ignore=docs/conf.py
    --ignore=setup.py
    --ignore=ci
    --ignore=.eggs
    --doctest-modules
    --doctest-glob=\*.rst
    --tb=short
    --pyargs
# The order of these options matters. testpaths comes after addopts so that
# nameless in testpaths is interpreted as
# --pyargs nameless.
# Any tests in the src/ directory (that is, tests installed with the package)
# can be run by any user with pytest --pyargs nameless.
testpaths =
    nameless
# If you want to switch back to tests outside package just remove --pyargs
# and edit testpaths to have "tests/" instead of "nameless".

# Idea from: https://til.simonwillison.net/pytest/treat-warnings-as-errors
filterwarnings =
    error
# You can add exclusions, some examples:
#    ignore:'nameless' defines default_app_config:PendingDeprecationWarning::
#    ignore:The {{% if:::
#    ignore:Coverage disabled via --no-cov switch!