From: Robin Krens Date: Wed, 14 Feb 2024 16:17:50 +0000 (+0100) Subject: tests: add/modify ack=True test X-Git-Tag: v0.0.1~16 X-Git-Url: https://robinkrens.nl/gitweb/?a=commitdiff_plain;h=e7bccc825b135adb1246a371751e63fab8a9b36f;p=renesas-ra-flasher tests: add/modify ack=True test --- diff --git a/tests/test_parse.py b/tests/test_parse.py index 988b44b..1cf8272 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -15,10 +15,10 @@ def test_read_unpack(): assert unpack_pkt(b'\x81\x00\x04\x15\xAA\xBB\xCC\xB6\x03') == ['0xAA', '0xBB', '0xCC'] def test_pack_unpack(): - assert unpack_pkt(pack_pkt(0x13, ['0x00','0x01','0x02'])) == ['0x00', '0x01', '0x02'] - assert unpack_pkt(pack_pkt(0x34, ['0x00'])) == ['0x00'] - assert unpack_pkt(pack_pkt(0x00, ['0x00'])) == ['0x00'] - assert unpack_pkt(pack_pkt(0x12, ['0x00'])) == ['0x00'] + assert unpack_pkt(pack_pkt(0x13, ['0x00','0x01','0x02'], ack=True)) == ['0x00', '0x01', '0x02'] + assert unpack_pkt(pack_pkt(0x34, ['0x00'], ack=True)) == ['0x00'] + assert unpack_pkt(pack_pkt(0x00, ['0x00'], ack=True)) == ['0x00'] + assert unpack_pkt(pack_pkt(0x12, ['0x00'], ack=True)) == ['0x00'] def test_err_unpack(): with pytest.raises(ValueError, match=r".*0xC3.*") as excinfo: