From f0b4541dde658813c863cd404a00c07872b1d202 Mon Sep 17 00:00:00 2001 From: jan iversen Date: Fri, 18 Oct 2024 16:09:52 +0200 Subject: [PATCH] step. --- test/pdu/test_pdu.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/pdu/test_pdu.py b/test/pdu/test_pdu.py index 3d31edc20..757078ed8 100644 --- a/test/pdu/test_pdu.py +++ b/test/pdu/test_pdu.py @@ -21,6 +21,14 @@ async def test_error_methods(self): assert result == b"\x01" assert self.exception.exception_code == 1 + async def test_get_pdu_size(self): + """Test all error methods.""" + assert not self.exception.get_response_pdu_size() + + async def test_is_error(self): + """Test all error methods.""" + assert self.exception.isError() + def test_request_exception_factory(self): """Test all error methods.""" request = ModbusPDU(0, 0, False) @@ -45,6 +53,7 @@ def test_calculate_rtu_frame_size(self): ) == 0x05 + 5 ) + assert not ModbusPDU.calculateRtuFrameSize(b"\x11") ModbusPDU._rtu_byte_count_pos = None # pylint: disable=protected-access with pytest.raises(NotImplementedException):