Beispiel #1
0
 def append_crc_8bit(expect):
     expect(framing.append_crc(b'hello world',
                               crc_size=CrcSize.CRC8)) == b'hello world\xa8'
Beispiel #2
0
 def append_crc(expect):
     expect(framing.append_crc(b'hello world')) == b'hello world\xa8'
Beispiel #3
0
 def append_crc_32bit(expect):
     expect(framing.append_crc(
         b'hello world',
         crc_size=CrcSize.CRC32)) == b'hello world\x85\x11J\r'
Beispiel #4
0
 def append_crc_zero_length(expect):
     expect(framing.append_crc(b'')) == b'\x00'
Beispiel #5
0
 def append_crc_16bit(expect):
     expect(framing.append_crc(
         b'hello world', crc_size=CrcSize.CRC16)) == b'hello world\xc19'