test: add installer-name matching helper tests for _installer_app_hint and _is_installed_app_installer#32
Open
gaomingyi779-del wants to merge 1 commit into
Conversation
test: add installer-name matching helper tests for _installer_app_hint and _is_installed_app_installer Adds pytest coverage for the two pure helper functions in sifty.core.junk that support the downloads-installers category logic (flagging installer files only for apps the user already has installed). ### TestInstallerAppHint (7 tests) - Suffix stripping: setup, installer, install, arch (_x64, _amd64), version - Normalisation: lowercasing, hyphen/underscore → space replacement - Verifies "_windows" suffix is correctly stripped ### TestIsInstalledAppInstaller (8 tests) - Parametrized matrix: exact match, substring match, short hint guard, no-match cases, empty installed set - Bidirectional substring matching (hint in name AND name in hint) - Short-hint guard (< 3 chars) after suffix stripping All 24 tests pass (18 new + 6 pre-existing). Co-Authored-By: Claude <noreply@anthropic.com> @
|
Thanks for your first pull request to Sifty! A couple of things that help it land quickly: Sifty deletes files, so all deletion must go through |
Owner
|
Sorry, we do not accept AI Generated PRs. |
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.
@
Issue
Closes #29
Changes
Added 18 pytest tests to
tests/test_junk.pycovering the two pure helper functions insrc/sifty/core/junk.py:TestInstallerAppHint (7 tests)
_windowssuffix is correctly strippedTestIsInstalledAppInstaller (8 tests)
Verification
All 24 tests pass (6 pre-existing + 18 new). No production code changes.
🤖 Generated with Claude Code
@