Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: improve coverage #35

Merged
merged 2 commits into from
Dec 11, 2024
Merged

TST: improve coverage #35

merged 2 commits into from
Dec 11, 2024

Conversation

mdhaber
Copy link
Owner

@mdhaber mdhaber commented Dec 11, 2024

Closes gh-32
After this and gh-34, coverage (according to coverage) should be about as high as possible.

@mdhaber
Copy link
Owner Author

mdhaber commented Dec 11, 2024

OK, I think I'll call this good.

---------- coverage: platform linux, python 3.10.15-final-0 ----------
Name                          Stmts   Miss Branch BrPart  Cover   Missing
-------------------------------------------------------------------------
marray/__init__.py              326      6     48      0    98%   414-420
marray/tests/test_marray.py     630      3     96      1    99%   72-73, 95
-------------------------------------------------------------------------
TOTAL                           956      9    144      1    99%

414-420 is the set functions (gh-34) and 72-73/95 are for when assertions fail (they re-raise with the seed to reproduce the problem).

@mdhaber mdhaber merged commit 7624e3d into main Dec 11, 2024
12 checks passed
@mdhaber
Copy link
Owner Author

mdhaber commented Dec 11, 2024

@keewis is there any way for a CI to fail if coverage changes for the worse?

@keewis
Copy link
Collaborator

keewis commented Dec 18, 2024

multiple ways, even: there's codecov/codecov-action (add --cov=marray --cov-report=xml to the pytest command and install pytest-cov), or you can follow the setup described at https://hynek.me/articles/ditch-codecov-python

I personally print the coverage report in CI and check manually, but it's easy forget to do when reviewing (on the other hand, coverage is a metric that we shouldn't really follow religiously)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TST: improve coverage
2 participants