Extend functions#2
Open
remcom wants to merge 12 commits into
Open
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add 8 comprehensive test cases for the _validate_phases validator function that will be implemented in Task 2. Tests cover: - Single-phase (phases:1) validation: - Requires ac_voltage - Rejects ac_voltage_a, ac_voltage_b, ac_voltage_c - Three-phase (phases:3) validation: - Requires all three ac_voltage_a, ac_voltage_b, ac_voltage_c - Rejects single-phase ac_voltage - Optional currents (all three or none) - Rejects partial current sets Tests use a helper function _make_base_config() to build minimal valid configs, reducing boilerplate. Tests are expected to fail with ImportError until the constants and _validate_phases function are defined. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Move sys.path.insert block to top of file, immediately after imports - Add missing test for phases:3 rejecting single-phase ac_current sensor - Fixes issue where sys.path manipulation was mid-file instead of adjacent to imports - Adds test coverage for _validate_phases rejecting ac_current in 3-phase config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…voltage registers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.