Skip to content

Fix thermostat circuit test parameter assertions#1438

Merged
liudger merged 1 commit intomainfrom
fix-test
Apr 11, 2026
Merged

Fix thermostat circuit test parameter assertions#1438
liudger merged 1 commit intomainfrom
fix-test

Conversation

@liudger
Copy link
Copy Markdown
Owner

@liudger liudger commented Apr 11, 2026

This pull request makes a targeted improvement to the test coverage for the thermostat circuit functionality. Specifically, it enhances the assertion in test_thermostat_circuit2_no_temp_range to verify that the _request method is called with the correct parameters, ensuring more precise validation of the code's behavior.

Test coverage improvements:

  • tests/test_circuit.py: Updated the assertion in test_thermostat_circuit2_no_temp_range to check that mock_bsblan_circuit._request is called with the expected arguments (base_path="/JS" and the correct data payload), rather than just being awaited.

@liudger liudger added the bugfix Inconsistencies or issues which will cause a problem for users or implementers. label Apr 11, 2026
Copilot AI review requested due to automatic review settings April 11, 2026 12:47
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.89%. Comparing base (c79da53) to head (2217d69).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1438   +/-   ##
=======================================
  Coverage   99.89%   99.89%           
=======================================
  Files           6        6           
  Lines         955      955           
  Branches      128      128           
=======================================
  Hits          954      954           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens test validation around the thermostat circuit (HC2) behavior by asserting the exact _request() call arguments, making the test verify the correct API payload rather than only that a call occurred.

Changes:

  • Updated test_thermostat_circuit2_no_temp_range to assert _request is awaited with base_path="/JS" and the expected {Parameter, Value, Type} payload.

@sonarqubecloud
Copy link
Copy Markdown

@liudger liudger merged commit a417dc1 into main Apr 11, 2026
19 checks passed
@liudger liudger deleted the fix-test branch April 11, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Inconsistencies or issues which will cause a problem for users or implementers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants