Skip to content

Commit

Permalink
Exclude generated code from coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
mmwinther committed Dec 16, 2024
1 parent d83d3a4 commit c551d5d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,21 @@ bpython = "^0.24"
testcontainers = { version = "^4.8.2", extras = ["generic"] }

[tool.pytest.ini_options]
pythonpath = [
"src",
"src/dapla_metadata/variable_definitions/generated/openapi_client",
]

pythonpath = ["src"]

[tool.coverage.paths]
source = ["src", "*/site-packages"]
tests = ["tests", "*/tests", "*/test"]

[tool.coverage.run]
branch = true
source = ["dapla_metadata"]
omit = ["tests/*", "__init__.py"]
omit = ["*/dapla_metadata/variable_definitions/generated/*"]
relative_files = true

[tool.coverage.report]
show_missing = true
fail_under = 80
omit = ["*/dapla_metadata/variable_definitions/generated/*"]

[tool.black]
# We don't want to format generated files because it creates large diffs
Expand Down

0 comments on commit c551d5d

Please sign in to comment.