Skip to content

Bring coverage to 100%#89

Merged
dguzh merged 4 commits intodguzh:developmentfrom
nicolasspring:tests/coverage
Jan 10, 2026
Merged

Bring coverage to 100%#89
dguzh merged 4 commits intodguzh:developmentfrom
nicolasspring:tests/coverage

Conversation

@nicolasspring
Copy link
Collaborator

This small PR should increase test coverage to 100%. This is done in three main ways:

  • Adding explicit tests for AcquisitionStage._should_skip_extraction() and AcquisitionStage._extract_zip() to cover handling of exceptions and edge cases.
  • Testing main() in geoparser/__main__.py via subprocess. Because this cannot be tracked by coverage in the parent process, the line is excluded from coverage nonetheless.
  • 2 additional lines with exception handling for disabling extensions (spellfix and spatialite in loader.py) are also excluded. These exception handlers guard against SQLite-internal failures. This allows us to exclude them in my opinion, as mocking such exceptions is a bit out of scope for this Python test suite. Feel free to challenge.

@nicolasspring nicolasspring requested a review from dguzh December 7, 2025 14:46
@github-actions
Copy link

github-actions bot commented Dec 7, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  geoparser
  __main__.py
  geoparser/db/extensions/spatialite
  loader.py
  geoparser/db/extensions/spellfix
  loader.py
Project Total  

This report was generated by python-coverage-comment-action

@dguzh dguzh merged commit 14bd881 into dguzh:development Jan 10, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants