par-tec / python-cookiecutter

Repository for boilerplate workflows
BSD 3-Clause "New" or "Revised" License
0 stars 4 forks source link

improve pytest defaults #24

Open CastixGitHub opened 1 year ago

CastixGitHub commented 1 year ago

add pytest-randomly add pytest-cov with a good configuration like the following in setup.cfg or pyproject.toml

[tool:pytest]
addopts = --cov=. --cov-report term-missing

if instead of term-missing a proper .coveragerc file is used, in the section [report] add the following

[report]
show_missing = True
skip_covered = True
# fail_under = 90

(notice skip_covered is unavailable with the above addopts)

also, coverage can also be configured with toml, see https://coverage.readthedocs.io/en/7.2.3/config.html

ioggstream commented 1 year ago

Great, please make a PR!