Skip to content

Commit

Permalink
Lift test coverage to 100%
Browse files Browse the repository at this point in the history
Add unit test for dims_complement
Increase requirement for code coverage from 98 to 100 percent
  • Loading branch information
tennlee committed Nov 1, 2023
1 parent 5d3c806 commit 1fe6822
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ source = ["/src/"]

[tool.pytest.ini_options]
addopts = [
'--cov-fail-under=98',
'--cov-report=html',
'--cov-report=term-missing',
'--junitxml=report.xml'
Expand Down
12 changes: 12 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
from tests import utils_test_data


def test_dims_complement():

xr_data = utils_test_data.DA_RGB
expected_dims = sorted(["red", "green", "blue"])
complement = utils.dims_complement(xr_data)
assert complement == expected_dims

expected_dims = sorted(["red", "green"])
complement = utils.dims_complement(xr_data, ["blue"])
assert complement == expected_dims


@pytest.mark.parametrize(
("xr_data", "expected_dims", "mode"),
[
Expand Down

0 comments on commit 1fe6822

Please sign in to comment.