Fix: handle empty/zero-line classes in Cobertura parser + add regression tests#177
Merged
afinetooth merged 13 commits intomasterfrom Sep 18, 2025
Merged
Fix: handle empty/zero-line classes in Cobertura parser + add regression tests#177afinetooth merged 13 commits intomasterfrom
afinetooth merged 13 commits intomasterfrom
Conversation
…ion tests
- Fixed Cobertura parser crash ("Arithmetic overflow") when a file had no <line> entries or only line="0" entries (e.g. kvstore/__init__.py).
- Added two tiny fixtures (cobertura-empty-lines.xml, cobertura-zero-only.xml) and new specs to prevent regressions.
- Updated developer setup:
• Added .venv/ workflow for Python deps (coverage.py + pytest).
• Pinned Python version in .python-version (3.12.7).
• Updated README with clear local dev/test instructions.
• Added Makefile `test` target integration so `make test` runs with venv.
This fixes the overflow reported by customer large Cobertura XML uploads, adds safety tests, and makes the dev environment reproducible.
…rom the default repos. That’s why CI can’t find it. Another option is to drop back to Ubuntu 22.04.
Pull Request Test Coverage Report for Build rc-aarch64-17813643176Details
💛 - Coveralls |
…Codacy complaint re: Crystal syntax linter.
…ov and python deps.
…ake build in coverage step.
… add debugging lines to webhook code and spec to examine test failures in CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Fixes a crash in the Cobertura parser (
Arithmetic overflow) when a file has:<package>/__init__.pyinside customer’s coverage XML).Adds two tiny fixtures (
cobertura-empty-lines.xml,cobertura-zero-only.xml) and specs to permanently guard against regressions.Updates developer setup to make Python-based parsers reproducible:
.venv/workflow for Python dependencies (coverage.py+pytest)..python-version(3.12.7).READMEwith clear local dev/test instructions.make testwith venv so local test runs are reliable.Why
(1..0)range.Testing
spec/fixtures/cobertura/.cobertura_parser_spec.crto assert parsing succeeds on those fixtures.Release note
Fixes Cobertura parser overflow for empty/zero-line classes, adds regression tests, and improves developer setup. Safe to cut a new release after merge.