diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..e99fed0 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,11 @@ +[run] +branch = True + +[report] +include = src/whl2conda/* +omit = src/whl2conda/external/* +exclude_lines = + pragma: no cover + raise AssertionError + raise NotImplementedError + diff --git a/.gitignore b/.gitignore index e2333e6..4a0cb14 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,8 @@ build/ *.tar.bz2 # test files -.coverage* +.coverage +.coverage.* coverage.json coverage.xml diff --git a/conftest.py b/conftest.py index a959842..2162b63 100644 --- a/conftest.py +++ b/conftest.py @@ -41,7 +41,7 @@ def pytest_configure(config): Add external marker to pytest configuration """ config.addinivalue_line( - "markers", "external: mark test as depending on extenral pypi package to run" + "markers", "external: mark test as depending on external pypi package to run" ) config.addinivalue_line("markers", "slow: mark test as slow to run") diff --git a/pyproject.toml b/pyproject.toml index ea56d02..582c40e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,6 +55,21 @@ pattern = "\\s*(?P[\\w.]*)" [tool.hatch.build.targets.wheel] packages = ["src/whl2conda"] +# TODO: Using coverage config in pyproject is resulting in +# INTERNALERROR> coverage.exceptions.DataError: Can't combine line data with arc data +# +#[tool.coverage.run] +#branch = true +# +#[tool.coverage.report] +#include = ["src/whl2conda/*"] +#omit = ["src/whl2conda/external/*"] +#exclude_also = [ +# "pragma: no cover", +# "raise AssertionError", +# "raise NotImplementedError" +#] + [tool.black] line-length = 88 skip-string-normalization = true