def test_lambda(self): byte_string = general_pack(lambda x, y: x + y) byte_stream = ByteStream(byte_string) new_value = general_unpack(byte_stream)[0] self.assertEqual(10, new_value(5, 5))
def single_value(test_self, value): byte_string = general_pack(value) byte_stream = ByteStream(byte_string) new_value = general_unpack(byte_stream)[0] test_self.assertEqual(value, new_value)
def pack(self) -> bytes: specific_byte_string = general_pack(self.function_name, self.args, self.kwargs) return super()._pack_all(specific_byte_string)
def pack(self) -> bytes: specific_byte_string = general_pack(self.src_path, self.dst_path, self.file_size) return super()._pack_all(specific_byte_string)
def pack(self) -> bytes: specific_byte_string = general_pack(self.data) return super()._pack_all(specific_byte_string)