-
Notifications
You must be signed in to change notification settings - Fork 84
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
RF: centralize invocation of coverage within run_coverage and use sys.executable -m coverage #1811
RF: centralize invocation of coverage within run_coverage and use sys.executable -m coverage #1811
Conversation
….executable -m coverage - duplication is evil - some systems might have it installed as python3-coverage not as coverage (Debian) - executable "coverage" might use shebang pointing to another python than used here Originally crafted for Debian package
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #1811 +/- ##
=======================================
Coverage 91.99% 91.99%
=======================================
Files 27 27
Lines 2623 2623
Branches 685 685
=======================================
Hits 2413 2413
Misses 138 138
Partials 72 72
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This test failure was introduced when we recently released a new version of HDMF. The test was fixed in #1778. However, the fix has not yet been released. We will release this soon but not during the holiday break.
Yes, it does. I know it is terribly ugly, but I have not yet found a better solution to test command line |
what are you trying to achieve? to gather coverage from running pynwb based scripts? If so: we had (have? ;)) similar problem in datalad where we do have command line tools which we wanted coverage of while invoking from command line. Our solution
❯ git grep PATH.*coverage-bin
.appveyor.yml: - sh: PATH=$PWD/../tools/coverage-bin:$PATH python -m pytest -c ../tox.ini -n 2 -s -v -m "not (turtle)" --cov=datalad --pyargs ${DTS}
.travis.yml: PATH=$PWD/../tools/coverage-bin:$PATH
tools/coverage-bin/datalad:export PYTHONPATH="$PWD/../tools/coverage-bin/"
|
Yes, exactly.
Clever! I'll explore this, but yes, we want to do basically the same thing. Thanks for the tip! |
Motivation
Originally crafted for Debian package
Note that locally I have two tests there failing while testing 2.5.0 release even without this diff
edit 1: doesn't for you it generate bunch of
.coverage.*
files you have to cleanup manually? IMHO should be avoided (didn't check if avoidable or should just be cleaned up later)Checklist
flake8
from the source directory.