From d82dfd55374cb91fb2aea175c88ce32a9ab7efb5 Mon Sep 17 00:00:00 2001 From: Yannick Kirschhoffer Date: Sun, 4 Nov 2018 00:17:09 +0100 Subject: [PATCH] Extended test to stress the CRC function. --- tests/test_common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_common.py b/tests/test_common.py index b83968a..12060d0 100644 --- a/tests/test_common.py +++ b/tests/test_common.py @@ -5,8 +5,9 @@ def test_hex2bin(): assert common.hex2bin('6E406B') == "011011100100000001101011" def test_crc_decode(): - checksum = common.crc("8D406B902015A678D4D220AA4BDA") - assert checksum == "000000000000000000000000" + for i in range(5000): + checksum = common.crc("8D406B902015A678D4D220AA4BDA") + assert checksum == "000000000000000000000000" def test_crc_encode(): parity = common.crc("8D406B902015A678D4D220AA4BDA", encode=True)