Skip to content

Commit

Permalink
#150: Add pytest-cov to the repo
Browse files Browse the repository at this point in the history
- nox -s tests -- --cov is a good starting point for usage
- I'm not sure how much I trust the output - there's around half coverage for both DB & ICAT backend's helper files, even though I've currently got the ICAT backend configured...
  • Loading branch information
MRichards99 committed Nov 10, 2020
1 parent d1b045f commit 257082e
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ config.json
.vscode/
.nox/
.python-version
.coverage
71 changes: 70 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,22 @@ flake8-comprehensions = "^3.3.0"
flake8-logging-format = "^0.6.0"
pep8-naming = "^0.11.1"
pytest = "^6.1.2"
coverage = {extras = ["toml"], version = "^5.3"}
pytest-cov = "^2.10.1"

[tool.poetry.scripts]
datagateway-api = "datagateway_api.src.main:run_api"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.coverage.paths]
source = ["datagateway_api"]

[tool.coverage.run]
branch = true
source = ["datagateway_api"]

[tool.coverage.report]
show_missing = true

0 comments on commit 257082e

Please sign in to comment.