Skip to content

Add tests for indexdata helper functions - #275

Merged
benoit74 merged 1 commit into
openzim:mainfrom
Sriram-Nambiar:test-indexdata-helpers
Oct 25, 2026
Merged

benoit74 merged 1 commit into
openzim:mainfrom
Sriram-Nambiar:test-indexdata-helpers

Conversation

@Sriram-Nambiar

@Sriram-Nambiar Sriram-Nambiar commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #154.

Adds unit tests for the internal indexdata Cython helper functions in test_libzim_creator.py:

  • Tested get_geoposition() with custom coordinates (lat, lon) and custom get_wordcount().
  • Tested exception handling when Python raises errors inside get_indexdata, has_indexdata, get_wordcount, and get_geoposition.

@rgaudin
rgaudin requested a review from benoit74 October 20, 2026 08:36
@benoit74

Copy link
Copy Markdown
Contributor

@Sriram-Nambiar please rebase on main and force push with lease, so that we have tests running on this PR

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.83%. Comparing base (2ccf1fc) to head (a4fef1a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #275      +/-   ##
==========================================
+ Coverage   94.33%   94.83%   +0.50%     
==========================================
  Files           1        1              
  Lines         600      600              
==========================================
+ Hits          566      569       +3     
+ Misses         34       31       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@benoit74

Copy link
Copy Markdown
Contributor

@Sriram-Nambiar please fix linting

@benoit74

Copy link
Copy Markdown
Contributor

Is this ready for a new review?

@benoit74 benoit74 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you

@benoit74
benoit74 force-pushed the test-indexdata-helpers branch from 2555377 to a4fef1a Compare October 25, 2026 17:37
@benoit74
benoit74 merged commit 2f93930 into openzim:main Oct 25, 2026
58 of 70 checks passed
pawank925 pushed a commit to pawank925/python-libzim that referenced this pull request Oct 28, 2026
…pers

Add tests for indexdata helper functions
pawank925 added a commit to pawank925/python-libzim that referenced this pull request Oct 28, 2026
…pers

Add tests for indexdata helper functions
pawank925 added a commit to pawank925/python-libzim that referenced this pull request Oct 28, 2026
…pers

Add tests for indexdata helper functions
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 indexdata helper functions

2 participants