Distro Module Preparation/Tests#6291
Distro Module Preparation/Tests#6291harvey0100 wants to merge 2 commits intoavocado-framework:masterfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refines the Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request primarily focuses on enhancing the avocado.utils.distro module. It removes distro.py from the pylint ignore list, ensuring code quality checks are applied. The module's docstrings have been refactored for conciseness and consistency, with type hints added to method parameters and return values. A deprecation warning has also been introduced for the distro module. Accompanying these changes, extensive new unit tests have been added for the LinuxDistro class, various Probe methods, regex pattern matching for different distributions, SUSE-specific version parsing, probe registration, and the detect function. A new functional test, DistroDetectLocal, has also been added to verify local distro detection. Finally, the expected test counts in selftests/check.py have been updated to reflect these new additions.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6291 +/- ##
==========================================
+ Coverage 73.67% 73.79% +0.11%
==========================================
Files 206 206
Lines 22634 22636 +2
==========================================
+ Hits 16676 16704 +28
+ Misses 5958 5932 -26 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Add module docstring and enhance RST docstrings for all public classes and methods (pylint-compliant) - Add deprecation warning for autils migration - Remove from .pylintrc_utils ignore list to enable pylint checking - Add to autils_migration_announcement workflow Assisted-By: Cursor-Claude-4-Sonnet Signed-off-by: Harvey Lynden <hlynden@redhat.com>
Add comprehensive test coverage for the distro module: - 24 new unit tests covering LinuxDistro, Probe methods, regex patterns, SUSEProbe custom logic, register_probe, detect scoring/fallback, Spec - 1 new functional test for local system detection - Update TEST_SIZE counts in check.py (unit: 976->1000, functional: 368->369) Coverage: 95% (untested: remote SSH session paths) Assisted-By: Cursor-Claude-4-Sonnet Signed-off-by: Harvey Lynden <hlynden@redhat.com>
Improvement of unit/functional tests, includes deprecation and new RST docstrings.