Skip to content

Commit 20d0d9f

Browse files
committed
feat: add code coverage
1 parent 2bbeb19 commit 20d0d9f

File tree

5 files changed

+174
-2
lines changed

5 files changed

+174
-2
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"ms-toolsai.jupyter",
2828
"charliermarsh.ruff",
2929
"streetsidesoftware.code-spell-checker",
30-
"tamasfe.even-better-toml"
30+
"tamasfe.even-better-toml",
31+
"ryanluker.vscode-coverage-gutters"
3132
]
3233
}
3334
}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
__pycache__
22

3+
# Code coverage
4+
lcov.info
5+
.coverage
6+
37
# Results of playwright tests with tracing
48
test-results/
59

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"python.testing.pytestArgs": [
3+
"tests"
4+
],
5+
"python.testing.unittestEnabled": false,
6+
"python.testing.pytestEnabled": true
7+
}

poetry.lock

Lines changed: 153 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@ authors = ["Piotr Pasza Storozenko <piotr@appsilon.com>"]
66
readme = "README.md"
77
packages = [{include = "pyshiny_template"}]
88

9+
[tool.coverage.run]
10+
source = ["pyshiny_template"]
11+
912
[tool.poetry.dependencies]
1013
python = "^3.10"
1114
shiny = "^0.8.1"
1215
pandas = "^2.2.1"
1316
rich = "^13.7.1"
1417
loguru = "^0.7.2"
18+
pytest-watch = "^4.2.0"
19+
pytest-cov = "^4.1.0"
1520

1621
[tool.poetry.group.dev.dependencies]
1722
icecream = "^2.1.3"
@@ -29,3 +34,6 @@ tenacity = "^8.2.3"
2934
[build-system]
3035
requires = ["poetry-core"]
3136
build-backend = "poetry.core.masonry.api"
37+
38+
[tool.pytest.ini_options]
39+
addopts = "--cov . --cov-report=lcov:lcov.info --cov-report=term"

0 commit comments

Comments
 (0)