Skip to content

Commit 2d1bbd7

Browse files
Add option for unit test coverage (#240)
## Issue 1. We are not defining a lower bound for the `ops` package 2. We are not generating a coverage report for unit tests ## Solution 1. Set `2.6.0` as the lower bound 2. Add option to generate coverage
1 parent 4452bac commit 2d1bbd7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

poetry.lock

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

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ authors = []
1010

1111
[tool.poetry.dependencies]
1212
python = "^3.10"
13-
ops = "<2.10.0"
13+
ops = "^2.6.0,<2.10.0"
1414
lightkube = "^0.14.0"
1515
tenacity = "^8.2.3"
1616
jinja2 = "^3.1.2"
@@ -19,7 +19,7 @@ requests = "^2.31.0"
1919

2020
[tool.poetry.group.charm-libs.dependencies]
2121
# data_platform_libs/v0/data_interfaces.py
22-
ops = "<2.10.0"
22+
ops = ">=2.0.0"
2323
# tls_certificates_interface/v1/tls_certificates.py
2424
cryptography = "*"
2525
jsonschema = "*"

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ commands_pre =
7070
poetry install --only main,charm-libs,unit
7171
commands =
7272
# `--numprocesses=120` workaround for extremely high memory usage (and out of memory crashes)
73-
poetry run pytest --numprocesses=120 --ignore={[vars]tests_path}/integration/ {posargs}
73+
poetry run pytest --numprocesses=120 --cov=src --ignore={[vars]tests_path}/integration/ {posargs}
7474

7575
[testenv:integration]
7676
description = Run integration tests

0 commit comments

Comments
 (0)