[Repo Assist] test: add 6 unit tests for sort-desc, UnpinnedOnly filter, and version edge cases (231→237)#172
Draft
github-actions[bot] wants to merge 1 commit intomainfrom
Conversation
…n edge cases (231→237) New tests cover previously untested branches in apply_filter and compare_versions: - apply_filter_sort_by_id_desc: descending ID sort orders Z→M→A - apply_filter_sort_by_version_desc: descending version sort respects numeric ordering (10.0 > 2.0 > 1.9) - apply_filter_unpinned_only_excludes_pinned: UnpinnedOnly filter removes Blocking-pinned packages - compare_versions_prerelease_beats_older_minor: 2.0-beta > 1.9 despite the text suffix - compare_versions_build_metadata_separator: + separator is split correctly (1.0+20240101 > 1.0+20230101) - local_filter_returns_empty_when_no_match: filter with no matches yields empty list, selection clamped to 0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
21 tasks
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.
🤖 This PR was created by Repo Assist, an automated AI assistant.
What
Adds 6 new unit tests in
src/app.rscovering previously untested branches inapply_filterandcompare_versions. Test count grows from 231 → 237.New tests
apply_filter_sort_by_id_descapply_filter_sort_by_version_descapply_filter_unpinned_only_excludes_pinnedPinFilter::UnpinnedOnlyremovesBlocking-pinned packagescompare_versions_prerelease_beats_older_minor2.0-beta > 1.9despite the-betatext suffix on the leading segmentcompare_versions_build_metadata_separator+is treated as a separator:1.0+20240101 > 1.0+20230101local_filter_returns_empty_when_no_matchWhy
The existing sort tests only covered ascending direction. Descending sort, the
UnpinnedOnlypin-filter branch, and version-parsing edge cases (-prerelease and+build-metadata separators) were all untested. These gaps mean a regression in any of these code paths would not be caught by CI.Test Status