diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 7154e2f80..000000000 --- a/.coveragerc +++ /dev/null @@ -1,28 +0,0 @@ -[run] -source = py/desispec -omit = - py/desispec/_version.py - py/desispec/conftest* - py/desispec/cython_version* - py/desispec/setup_package* - py/desispec/*/setup_package* - py/desispec/*/*/setup_package* - py/desispec/sphinx/* - py/desispec/test/* - py/desispec/*/test/* - py/desispec/*/*/test/* - -[report] -exclude_lines = - # Have to re-enable the standard pragma - pragma: no cover - - # Don't complain about packages we have installed - except ImportError - - # Don't complain if tests don't hit assertions - raise AssertionError - raise NotImplementedError - - # Don't complain about script hooks - ### def main\(.*\): diff --git a/setup.cfg b/setup.cfg index 1cee296c9..6aadb66f5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,34 @@ +[tool:pytest] +testpaths = py + +[coverage:run] +relative_files = True +source = + py/desispec +omit = + py/desispec/_version.py + py/desispec/conftest* + py/desispec/test/* + */desispec/_version.py + */desispec/conftest* + */desispec/test/* + +[coverage:report] +exclude_lines = + # Have to re-enable the standard pragma + pragma: no cover + # Don't complain about packages we have installed + except ImportError + # Don't complain if tests don't hit assertions + raise AssertionError + raise NotImplementedError + # Don't complain about script hooks + def main\(.*\): + # Ignore branches that don't pertain to this version of Python + pragma: py{ignore_python_version} + # Don't complain about IPython completion helper + def _ipython_key_completions_ + [pycodestyle] # See https://pycodestyle.readthedocs.io/en/latest/intro.html#configuration # for details of these configuration options.