Skip to content

Improve test coverage for tools, float, binary, geo and todo - issues…#1291

Open
shiva-kumar04 wants to merge 1 commit intocollective:mainfrom
shiva-kumar04:improve-test-coverage-698
Open

Improve test coverage for tools, float, binary, geo and todo - issues…#1291
shiva-kumar04 wants to merge 1 commit intocollective:mainfrom
shiva-kumar04:improve-test-coverage-698

Conversation

@shiva-kumar04
Copy link

@shiva-kumar04 shiva-kumar04 commented Mar 21, 2026

… 698

Closes issue

Description

Improves test coverage by adding tests for previously uncovered branches. Improves coverage from 96% to 98%

Focus areas:

  • normalize_pytz
  • vFloat.ical_value
  • vBinary.hash
  • vGeo.hash
  • ToDo.duration

Checklist

  • I've added a change log entry to CHANGES.rst.
  • I've added or updated tests if applicable.
  • I've run and ensured all tests pass locally by following Run tests.
  • I've added or edited documentation, both as docstrings to be rendered in the API documentation and narrative documentation, as necessary.

Additional information

beforeCoverage.html

afterCoverage.html

@read-the-docs-community
Copy link

Documentation build overview

📚 icalendar | 🛠️ Build #31906853 | 📁 Comparing 393210b against latest (fae9f6e)


🔍 Preview build

Show files changed (1 files in total): 📝 1 modified | ➕ 0 added | ➖ 0 deleted
File Status
404.html 📝 modified
@niccokunzmann
Copy link
Member

Thanks, I added a few comments.
Also, please format the code: https://github.com/collective/icalendar/actions/runs/23376081732/job/68008197434?pr=1291

from datetime import datetime
import pytz

def test_normalize_pytz():
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
def test_normalize_pytz():
def test_normalize_pytz(pytz_only):
import pytz

Hi, icalendar also works without pytz. This could be a solution..

date(2024, 1, 1),
],
)
@pytest.mark.parametrize("Component", [Todo])
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@pytest.mark.parametrize("Component", [Todo])
@pytest.mark.parametrize("Component", [Todo, Event])

Nice! Does this also work with Event?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants