Skip to content

test(#144): increase ExclusionDetector coverage from 59% to 100%#147

Merged
longieirl merged 1 commit intomainfrom
test/144-exclusion-detector-coverage
Apr 13, 2026
Merged

test(#144): increase ExclusionDetector coverage from 59% to 100%#147
longieirl merged 1 commit intomainfrom
test/144-exclusion-detector-coverage

Conversation

@longieirl
Copy link
Copy Markdown
Owner

Summary

  • Adds packages/parser-core/tests/detectors/test_exclusion_detector.py with 11 tests covering all previously uncovered paths in exclusion_detector.py
  • Creates tests/detectors/__init__.py for the new test subdirectory

Changes

  • New file: packages/parser-core/tests/detectors/__init__.py
  • New file: packages/parser-core/tests/detectors/test_exclusion_detector.py (11 tests)

Type

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation
  • Performance
  • Security
  • Tests only

Testing

  • Tests pass (coverage ≥ 91%) — exclusion_detector.py now at 100%, overall at 94.24%
  • Manually tested — python -m pytest tests/ --cov=bankstatements_core passes locally
  • make docker-integration passed locally (not required — no changes to Dockerfile, entrypoint.sh, docker-compose.yml, or production source)

Checklist

  • Code follows project style — black + isort + ruff all clean
  • Self-reviewed
  • Documentation updated (if needed) — N/A, tests only
  • No new warnings

Downstream impact

  • This PR changes a public interface in bankstatements_core — N/A, tests only

Closes #144

Covers all previously uncovered paths: name property, no-exclusion-rules
skip, keyword match/no-match, crop() fallback on AttributeError and
ValueError, no-text early return, case-insensitive matching, and partial
keyword match in match_details.
@longieirl longieirl self-assigned this Apr 13, 2026
@longieirl longieirl merged commit b635374 into main Apr 13, 2026
12 checks passed
@longieirl longieirl deleted the test/144-exclusion-detector-coverage branch April 13, 2026 18:03
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.

test: increase coverage for ExclusionDetector (currently 59%)

2 participants