Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide external from coverage report (#123) #143

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[run]
branch = True

[report]
include = src/whl2conda/*
omit = src/whl2conda/external/*
exclude_lines =
pragma: no cover
raise AssertionError
raise NotImplementedError

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ build/
*.tar.bz2

# test files
.coverage*
.coverage
.coverage.*
coverage.json
coverage.xml

Expand Down
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,21 @@ pattern = "\\s*(?P<version>[\\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
Expand Down
Loading