Beispiel #1
0
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
Beispiel #2
0
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
Beispiel #3
0
def test_crc_decode():
    checksum = util.crc("8D406B902015A678D4D220AA4BDA")
    assert checksum == "000000000000000000000000"
Beispiel #4
0
def test_crc_encode():
    parity = util.crc("8D406B902015A678D4D220AA4BDA", encode=True)
    assert util.hex2bin("AA4BDA") == parity
Beispiel #5
0
def test_crc_decode():
    checksum = util.crc("8D406B902015A678D4D220AA4BDA")
    assert checksum == "000000000000000000000000"
Beispiel #6
0
def test_crc_encode():
    parity = util.crc("8D406B902015A678D4D220AA4BDA", encode=True)
    assert util.hex2bin("AA4BDA") == parity