Skip to content

test(s7): e2e Read Var for int16/int32/float32/bool - #33

Open
CRYPTONIKAV wants to merge 1 commit into
suoten:masterfrom
CRYPTONIKAV:fix/30-s7-read-write-e2e
Open

CRYPTONIKAV wants to merge 1 commit into
suoten:masterfrom
CRYPTONIKAV:fix/30-s7-read-write-e2e

Conversation

@CRYPTONIKAV

Copy link
Copy Markdown
Contributor

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 the test_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.pack big-endian). This caught a real encoding detail during development: BIT reads answer with transport 0x03/length 1, not 0x04/8. Verified: 4 passed with pytest tests/test_s7_read_write_e2e.py -v --no-cov; a mutated expectation fails (RED); ruff check+format clean.

Verifies response bytes equal the device behavior values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant