test: add edge case coverage for Conference parameter normalization#1310
Merged
niccokunzmann merged 2 commits intocollective:mainfrom Apr 6, 2026
Merged
Conversation
Add tests for the normalize() function's handling of string passthrough, empty list filtering, and None omission across feature, label, and language parameters. These edge cases were identified in collective#925 after the normalization fix in PR collective#921. Closes collective#925
Fix ruff PT006 (parametrize first arg should be a tuple) and add the missing CHANGES.rst entry for the Conference test coverage.
niccokunzmann
approved these changes
Apr 6, 2026
Member
niccokunzmann
left a comment
There was a problem hiding this comment.
Thanks! The tests seem alright.
Contributor
Author
Thanks for the approval and merge! |
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.
Summary
Adds 12 tests covering edge cases in the
normalize()function used byConference.to_uri()for thefeature,label, andlanguageparameters.Why this matters
PR #921 fixed the normalization bug from #908, but left edge cases untested. The
normalize()function inconference.py:88-93handles three input types (string, empty list, None) and any of these branches could regress during refactoring without test coverage.Changes
src/icalendar/tests/prop/test_conference.py: Added 12 new tests in three groups:test_string_feature_passthrough,test_empty_list_feature_filtered,test_none_feature_omitted): Verify core behavior withfeatureparametertest_string_passthrough_all_params): Verifies string values pass through unchanged for all three parameterstest_empty_list_filtered_all_params): Verifies empty lists are omitted for all three parameterstest_none_omitted_all_params): Verifies None values produce no param entry for all three parametersTesting
All 36 tests pass (24 existing + 12 new):
Fixes #925
This contribution was developed with AI assistance (Claude Code).