Clarify force_update cancellation test and add no-coordinators noop test#132
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
Code Review
This pull request updates the test suite in tests/test_init.py. It renames test_force_update_handles_cancelled_error to test_force_update_handles_per_entry_cancelled_error with an updated docstring, and adds a new test test_force_update_no_coordinators_is_noop to verify that calling force_update when no coordinators are available behaves as a safe no-op. There are no review comments, and I have no feedback to provide.
Motivation
Description
test_force_update_handles_cancelled_errortotest_force_update_handles_per_entry_cancelled_errorand update its docstring to"""Per-entry cancellation results should not abort the global service."""intests/test_init.py.test_force_update_no_coordinators_is_noopintests/test_init.pythat sets up an emptyhass(no entries), assertsasync_setupreturnsTrue, calls thepollenlevels.force_updateservice, and checks the debug log containsNo coordinators available for force_update.custom_components/pollenlevels/or other runtime code were modified.Testing
ruff check --fix --select I tests/test_init.py && ruff check .and the checks passed.black --check .and the check passed.pytest tests/test_init.pyand all tests in that file passed (33 passed).pytestand the entire suite passed (310 passed).Codex Task