Skip to content

(test) add unit tests for installer app hint logic#33

Open
avatGit wants to merge 1 commit into
Vortrix5:mainfrom
avatGit:docs/add-junk-tests
Open

(test) add unit tests for installer app hint logic#33
avatGit wants to merge 1 commit into
Vortrix5:mainfrom
avatGit:docs/add-junk-tests

Conversation

@avatGit

@avatGit avatGit commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

As requested, this PR adds unit tests for the pure helper functions in src/sifty/core/junk.py that handle the installer app gating logic.

Changes

  • Added test_installer_app_hint_strips_suffixes to verify version and architecture cleaning.
  • Added test_is_installed_app_installer_matches_substrings to validate bidirectional substring matching using a frozenset.
  • Added test_is_installed_app_installer_under_3_chars_guard to ensure the short-hint safety guard works perfectly.

Closes #29

Safety checklist

Sifty deletes files, so every PR keeps these promises:

  • pytest is green, including tests/test_safety.py
  • No new direct deletions (os.remove, shutil.rmtree, Path.unlink); everything goes through safety.trash()
  • New destructive paths default to dry-run and ask before applying
  • New core functions have a matching test

@github-actions

Copy link
Copy Markdown

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 safety.trash() and destructive paths default to dry-run. Please make sure pytest is green (especially tests/test_safety.py) and that the PR title starts with a type tag like (feat) or (fix). See CONTRIBUTING.md for the full checklist. A maintainer will review shortly.

@github-actions github-actions Bot added the tests Test suite label Jun 26, 2026
@avatGit avatGit changed the title (test): add unit tests for installer app hint logic (test) add unit tests for installer app hint logic Jun 26, 2026
@avatGit avatGit force-pushed the docs/add-junk-tests branch from e0878a0 to 95451d0 Compare June 26, 2026 15:42
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

Labels

tests Test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests for the installer-name matching helpers in junk.py

2 participants