Repository navigation
test(s7): e2e Read Var for int16/int32/float32/bool - #33
Open
CRYPTONIKAV wants to merge 1 commit into
Open
CRYPTONIKAV wants to merge 1 commit into
CRYPTONIKAV wants to merge 1 commit into
Conversation
Verifies response bytes equal the device behavior values.
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.
Related to #30
What I changed
tests/test_s7_read_write_e2e.py(new): end-to-end S7 Read Var tests for int16 (MW0), int32 (DB1.DBD8), float32 (DB1.DBD0) and bool (DB1.DBX4.0), following thetest_ab_forward_open.py/ golden pattern (raw frame in, parsed response out).How it works
Values are set through the device behavior API (
sync_point_value) and the raw response bytes must equal the packed values (struct.packbig-endian). This caught a real encoding detail during development: BIT reads answer with transport0x03/length 1, not0x04/8. Verified: 4 passed withpytest tests/test_s7_read_write_e2e.py -v --no-cov; a mutated expectation fails (RED); ruff check+format clean.