diff --git a/pyproject.toml b/pyproject.toml index 6ca9ddc8193..8757572f6e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -215,3 +215,19 @@ markers = [ "setup_command", ] testpaths = ["tests"] + +[tool.coverage.run] +branch = true +parallel = true +source = ['sphinx'] + +[tool.coverage.report] +exclude_lines = [ + # Have to re-enable the standard pragma + 'pragma: no cover', + # Don't complain if tests don't hit defensive assertion code: + 'raise NotImplementedError', + # Don't complain if non-runnable code isn't run: + 'if __name__ == .__main__.:', +] +ignore_errors = true diff --git a/setup.cfg b/setup.cfg index 8c2224b22c7..4cdb9ffe2c5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,18 +6,3 @@ application-import-names = sphinx import-order-style = smarkets per-file-ignores = tests/*: E501 - -[coverage:run] -branch = True -parallel = True -source = sphinx - -[coverage:report] -exclude_lines = - # Have to re-enable the standard pragma - pragma: no cover - # Don't complain if tests don't hit defensive assertion code: - raise NotImplementedError - # Don't complain if non-runnable code isn't run: - if __name__ == .__main__.: -ignore_errors = True