Skip to content

Commit

Permalink
Merge pull request #392 from neutrinoceros/dep/coverage_setup
Browse files Browse the repository at this point in the history
TST: configure coverage
  • Loading branch information
neutrinoceros authored Dec 5, 2024
2 parents 6bf6779 + 4878fad commit a061be1
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ baballe = "idefix_cli.__main__:alt_main"
Homepage = "https://github.com/neutrinoceros/idefix_cli"

[dependency-groups]
covcheck = [
"coverage[toml]>=6.5.0",
]
test = [
"pytest-check>=2.1.2",
"pytest>=7.2.1",
Expand Down Expand Up @@ -67,6 +70,32 @@ select = [
combine-as-imports = true
known-first-party = ["idefix_cli"]

[tool.coverage.run]
branch = true
source = [
"src/idefix_cli",
"tests",
]
omit = [
# this test generates fake source files that are removed in teardown
"*test_broken_command_plugin*"
]

[tool.coverage.report]
show_missing = true
skip_covered = false
exclude_lines = [
# a more strict default pragma
"\\# pragma: no cover\\b",

# allow defensive code
"^\\s*raise NotImplementedError\\b",

": \\.\\.\\.(\\s*#.*)?$",
"^ +\\.\\.\\.$",
"-> ['\"]?NoReturn['\"]?:",
]

[tool.mypy]
python_version = '3.10'
show_error_codes = true
Expand Down

0 comments on commit a061be1

Please sign in to comment.