Modify ↓
Opened 16 years ago
Closed 16 years ago
#509 closed defect (fixed)
ZeroDivisionError in code coverage calculation if no interesting lines found
| Reported by: | Felix Schwarz <felix.schwarz@…> | Owned by: | osimons |
|---|---|---|---|
| Priority: | major | Milestone: | 0.6 |
| Component: | Build slave | Version: | dev |
| Keywords: | Cc: | andrea.tomasini@… | |
| Operating System: |
Description
[ERROR ] Internal error in build step 'test'
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/bitten/slave.py", line 328, in _execute_step
for type, category, generator, output in \
File "/usr/lib/python2.4/site-packages/bitten/recipe.py", line 228, in execute
ctxt.run(self, child.namespace, child.name, child.attr)
File "/usr/lib/python2.4/site-packages/bitten/recipe.py", line 106, in run
function(self, **args)
File "/usr/lib/python2.4/site-packages/bitten/build/pythontools.py", line 403, in figleaf
percentage = int(round(len(covered_lines) * 100 / len(interesting_lines)))
ZeroDivisionError: float division
[WARNING ] Stopping build due to failure
This happens in a file like this:
# license header __version__ = '1.0' __name__ = 'foo' FOO_VALUE = 42
Interesting lines is 0 but there are some lines in the coverage data.
Attachments (1)
Change History (3)
Changed 16 years ago by Felix Schwarz <felix.schwarz@…>
comment:1 Changed 16 years ago by osimons
- Milestone changed from 0.6.1 to 0.6
- Owner set to osimons
Makes sense. I'll commit the patch.
comment:2 Changed 16 years ago by osimons
- Resolution set to fixed
- Status changed from new to closed
Thanks! Committed in [799]. Will merge to 0.6.x.
Note: See
TracTickets for help on using
tickets.

skip file if no interesting lines were found