Skip to content

Commit

Permalink
step.
Browse files Browse the repository at this point in the history
  • Loading branch information
janiversen committed Oct 18, 2024
1 parent 796e63c commit f0b4541
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/pdu/test_pdu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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):
Expand Down

0 comments on commit f0b4541

Please sign in to comment.