From 39e85c9a2ee8e5cd833262cbd02e07784e14d60b Mon Sep 17 00:00:00 2001 From: jan iversen Date: Sun, 20 Oct 2024 18:51:50 +0200 Subject: [PATCH] Function code test to pdu. --- test/{sub_function_codes => pdu}/test_all_messages.py | 0 test/{sub_function_codes => pdu}/test_bit_read_messages.py | 2 +- test/{sub_function_codes => pdu}/test_bit_write_messages.py | 2 +- test/{sub_function_codes => pdu}/test_diag_messages.py | 0 test/{sub_function_codes => pdu}/test_mei_messages.py | 0 test/{sub_function_codes => pdu}/test_other_messages.py | 0 .../{sub_function_codes => pdu}/test_register_read_messages.py | 3 ++- .../test_register_write_messages.py | 2 +- 8 files changed, 5 insertions(+), 4 deletions(-) rename test/{sub_function_codes => pdu}/test_all_messages.py (100%) rename test/{sub_function_codes => pdu}/test_bit_read_messages.py (99%) rename test/{sub_function_codes => pdu}/test_bit_write_messages.py (99%) rename test/{sub_function_codes => pdu}/test_diag_messages.py (100%) rename test/{sub_function_codes => pdu}/test_mei_messages.py (100%) rename test/{sub_function_codes => pdu}/test_other_messages.py (100%) rename test/{sub_function_codes => pdu}/test_register_read_messages.py (99%) rename test/{sub_function_codes => pdu}/test_register_write_messages.py (99%) diff --git a/test/sub_function_codes/test_all_messages.py b/test/pdu/test_all_messages.py similarity index 100% rename from test/sub_function_codes/test_all_messages.py rename to test/pdu/test_all_messages.py diff --git a/test/sub_function_codes/test_bit_read_messages.py b/test/pdu/test_bit_read_messages.py similarity index 99% rename from test/sub_function_codes/test_bit_read_messages.py rename to test/pdu/test_bit_read_messages.py index 85f807e37a..ff892438e3 100644 --- a/test/sub_function_codes/test_bit_read_messages.py +++ b/test/pdu/test_bit_read_messages.py @@ -15,7 +15,7 @@ ReadCoilsRequest, ReadDiscreteInputsRequest, ) -from test.conftest import MockContext +from ..conftest import MockContext res = [True] * 21 diff --git a/test/sub_function_codes/test_bit_write_messages.py b/test/pdu/test_bit_write_messages.py similarity index 99% rename from test/sub_function_codes/test_bit_write_messages.py rename to test/pdu/test_bit_write_messages.py index 54cae8b41a..9d50307de2 100644 --- a/test/sub_function_codes/test_bit_write_messages.py +++ b/test/pdu/test_bit_write_messages.py @@ -13,7 +13,7 @@ WriteSingleCoilRequest, WriteSingleCoilResponse, ) -from test.conftest import FakeList, MockContext +from ..conftest import FakeList, MockContext # ---------------------------------------------------------------------------# diff --git a/test/sub_function_codes/test_diag_messages.py b/test/pdu/test_diag_messages.py similarity index 100% rename from test/sub_function_codes/test_diag_messages.py rename to test/pdu/test_diag_messages.py diff --git a/test/sub_function_codes/test_mei_messages.py b/test/pdu/test_mei_messages.py similarity index 100% rename from test/sub_function_codes/test_mei_messages.py rename to test/pdu/test_mei_messages.py diff --git a/test/sub_function_codes/test_other_messages.py b/test/pdu/test_other_messages.py similarity index 100% rename from test/sub_function_codes/test_other_messages.py rename to test/pdu/test_other_messages.py diff --git a/test/sub_function_codes/test_register_read_messages.py b/test/pdu/test_register_read_messages.py similarity index 99% rename from test/sub_function_codes/test_register_read_messages.py rename to test/pdu/test_register_read_messages.py index ce5504e656..251d8dfe9c 100644 --- a/test/sub_function_codes/test_register_read_messages.py +++ b/test/pdu/test_register_read_messages.py @@ -10,7 +10,8 @@ ReadWriteMultipleRegistersRequest, ReadWriteMultipleRegistersResponse, ) -from test.conftest import FakeList, MockContext + +from ..conftest import FakeList, MockContext TEST_MESSAGE = b"\x06\x00\x0a\x00\x0b\x00\x0c" diff --git a/test/sub_function_codes/test_register_write_messages.py b/test/pdu/test_register_write_messages.py similarity index 99% rename from test/sub_function_codes/test_register_write_messages.py rename to test/pdu/test_register_write_messages.py index 8d702fb77b..313ef0350d 100644 --- a/test/sub_function_codes/test_register_write_messages.py +++ b/test/pdu/test_register_write_messages.py @@ -9,7 +9,7 @@ WriteSingleRegisterRequest, WriteSingleRegisterResponse, ) -from test.conftest import MockContext, MockLastValuesContext +from ..conftest import MockContext, MockLastValuesContext # ---------------------------------------------------------------------------#