Closed mtelka closed 11 months ago
Hmm. The latest build in CI for Python 3.9 says:
platform linux -- Python 3.9.17, pytest-7.4.1, pluggy-1.3.0 ... Required test coverage of 100% reached. Total coverage: 100.00%
Not sure if the difference is related to sunos5
. Do you have the results for Argh 0.28 in the same environment? Do you have more detailed information about the missed statements?
This argh.completion
where coverage is missing is a tiny module with barely any logic, so it's probably either sh
being used instead of bash
in that environment, or argcomplete
not being installed.
The more complete report shows these two lines as missing:
70 except ImportError:
71 argcomplete = None
Hm, interesting. Looks like in your environment argcomplete
is present and in the default CI environments for Argh it's not.
It may be a good idea to add a tox env with extras=completion
.
OTOH, the only thing it would check is whether COMPLETION_ENABLED
is set to the correct value depending on whether it was possible to import argcomplete
. It's such a trivial bit of logic that I'm rather leaning towards adding # pragma: no cover
to these lines that you've mentioned. The behaviour with and without argcomplete
is tested with a mock in any case.
Yes, exactly. The argcomplete
is installed here.
I've excluded that line from coverage, it really makes no sense to add a whole tox env to test that pretty obvious bit of code. Thanks for reporting!
I'm packaging
argh
for OpenIndiana and during testing of version0.29.3
I noticed the coverage fails: