def test_fail(): encoded = list(framing.encode('')) encoded[-1] = not encoded[-1] with pytest.raises(ValueError): concat(framing.decode_frames(encoded))
def test_main(data): encoded = framing.encode(data) decoded = framing.decode_frames(encoded) assert concat(decoded) == data
def send(self, data): #self.sender.start() self.sender.write(np.zeros(int(self.config.silence_start))) bits = framing.encode(data, self.framer) self.sender.modulate(bits=bits)