def append_crc_8bit(expect): expect(framing.append_crc(b'hello world', crc_size=CrcSize.CRC8)) == b'hello world\xa8'
def append_crc(expect): expect(framing.append_crc(b'hello world')) == b'hello world\xa8'
def append_crc_32bit(expect): expect(framing.append_crc( b'hello world', crc_size=CrcSize.CRC32)) == b'hello world\x85\x11J\r'
def append_crc_zero_length(expect): expect(framing.append_crc(b'')) == b'\x00'
def append_crc_16bit(expect): expect(framing.append_crc( b'hello world', crc_size=CrcSize.CRC16)) == b'hello world\xc19'