Ticket #5859 (closed defect: fixed)
sage -coverageall fails on directories with zero tests
| Reported by: | mabshoff | Owned by: | mabshoff |
|---|---|---|---|
| Priority: | major | Milestone: | sage-5.0 |
| Component: | doctest coverage | Keywords: | |
| Cc: | mjo | Work issues: | |
| Report Upstream: | N/A | Reviewers: | André Apitzsch |
| Authors: | Michael Orlitzky | Merged in: | sage-5.0.rc0 |
| Dependencies: | Stopgaps: |
Description
./sage -coverageall devel/sage/sage/catalogue/
results in
Traceback (most recent call last):
File "/scratch/mabshoff/sage-3.4.2.alpha0/local/bin/sage-coverageall", line 44, in <module>
coverage_all(sys.argv[1])
File "/scratch/mabshoff/sage-3.4.2.alpha0/local/bin/sage-coverageall", line 28, in coverage_all
score = (float(scr) / total)
ZeroDivisionError: float division
Attachments
Change History
Changed 17 months ago by mjo
-
attachment
sage-trac_5859.patch
added
comment:1 Changed 17 months ago by mjo
- Cc mjo added
- Status changed from new to needs_review
- Report Upstream set to N/A
- Authors set to Michael Orlitzky
This was a pretty small fix, so there it is.
The coverage score would naturally be undefined, but saying it's 100% of zero is a useful fiction in this case.
Note: See
TracTickets for help on using
tickets.

Default to 100% coverage when there are no tests.