def test_crc(): # crc decoder checksum = util.crc("8D406B902015A678D4D220AA4BDA") assert checksum == "000000000000000000000000" # crc encoder parity = util.crc("8D406B902015A678D4D220AA4BDA", encode=True) assert util.hex2bin("AA4BDA") == parity
def test_crc_decode(): checksum = util.crc("8D406B902015A678D4D220AA4BDA") assert checksum == "000000000000000000000000"
def test_crc_encode(): parity = util.crc("8D406B902015A678D4D220AA4BDA", encode=True) assert util.hex2bin("AA4BDA") == parity