refactor(tests): consolidate property tests and optimize fixtures#604
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/autolabeler.yml:
- Line 9: The workflow currently includes the unsupported/unstable pull_request
type "edited" in the autolabeler triggers (pull_request.types and
pull_request_target.types); remove "edited" and instead use supported triggers
such as "synchronize" (or "opened" / "reopened") or implement explicit logic to
re-run labeling on title/body edits (e.g., add a separate workflow triggered by
issue_comment/workflow_dispatch or a webhook handler) so labels are reliably
re-evaluated; update the entries that reference "edited" accordingly (search for
pull_request.types and pull_request_target.types in autolabeler.yml).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6f33d8b1-3bcf-4342-a982-48ff7d99f3fd
📒 Files selected for processing (3)
.github/workflows/autolabeler.ymltests/conftest.pytests/test_properties.py
Code Review Summary for PR 604Verdict: ✅ LGTM — The refactoring is clean and focused. Critical Issues
Warnings
Suggestions
Looks Good
|
This PR cleans up the test suite by:
tests/test_properties.pyinto a single parameterized test (test_simple_properties).tests/conftest.pyusing a single_setup_chargerhelper function to handle duplicate statuses, configs, and WebSocket client registrations.This reduces the codebase by roughly 800 lines of boilerplate while maintaining identical functional coverage. All 416 test cases still pass successfully.
Summary by CodeRabbit
Tests
Chores