Ticket #12896 (needs_work enhancement)
make coverageall print the number of untested functions
| Reported by: | AlexGhitza | Owned by: | mvngu |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-5.10 |
| Component: | documentation | Keywords: | coverageall |
| Cc: | Work issues: | ||
| Report Upstream: | N/A | Reviewers: | André Apitzsch |
| Authors: | Alex Ghitza | Merged in: | |
| Dependencies: | Stopgaps: |
Description (last modified by AlexGhitza) (diff)
The upcoming patch adds a line to the output of sage -coverageall, with the number of untested functions. It also fixes a plural. Here is an example of the new output:
[aghitza@cerelia sage-5.0.beta13]$ ./sage -coverageall devel/sage/sage/coding ag_code.py: 100% (1 of 1) binary_code.pyx: 91% (41 of 45) code_bounds.py: 100% (17 of 17) code_constructions.py: 96% (25 of 26) decoder.py: 100% (3 of 3) guava.py: 100% (3 of 3) linear_code.py: 82% (52 of 63) sd_codes.py: 20% (1 of 5) source_coding/huffman.py: 100% (9 of 9) Overall weighted coverage score: 88.1% Total number of functions: 172 Number of untested functions: 20 We need 3 more function(s) to get to 90% coverage. We need 11 more function(s) to get to 95% coverage. We need 18 more function(s) to get to 99% coverage.
Apply
- trac_12896-coverageall.patch to the scripts repo
Attachments
Change History
comment:2 Changed 13 months ago by AlexGhitza
- Status changed from new to needs_review
- Authors set to Alex Ghitza
comment:3 Changed 13 months ago by aapitzsch
- Status changed from needs_review to needs_work
- Reviewers set to André Apitzsch
With the exact number of untested functions we don't have to estimate scr by
scr = 0
i = y.rfind(':')
j = y.rfind('%')
scr += int(y[i+1:j]) * float(n)
and should use
scr = (total - untested) * 100
instead.
Also take note of #5859.
Note: See
TracTickets for help on using
tickets.

