def test_pack_unpack(self): """IndicData""" bytes = self.indic_data.pack(self.nulls) unpacker = tdcli.indic_data(len(self.nulls)) unpacked_nulls = unpacker.unpack(bytes) self.assertEqual(len(self.nulls), len(unpacked_nulls)) self.assertEqual(unpacked_nulls, self.nulls)
def test_pack_unpack(self): """IndicData""" bytes = self.indic_data.pack(self.nulls) unpacker = tdcli.indic_data(len(self.nulls)) unpacked_nulls = unpacker.unpack(bytes) self.assertEqual(len(self.nulls),len(unpacked_nulls)) self.assertEqual(unpacked_nulls,self.nulls)
def setUp(self): self.columns = random.randint(0, 320) self.indic_data = tdcli.indic_data(self.columns) self.nulls = [] for i in range(0, self.columns): if bool(random.randint(0, 1)) is True: self.nulls.append(True) else: self.nulls.append(False) self.assertEqual(self.columns, len(self.nulls))
def setUp(self): self.columns = random.randint(0,320) self.indic_data = tdcli.indic_data(self.columns) self.nulls = [] for i in range(0,self.columns): if bool(random.randint(0,1))is True: self.nulls.append(True) else: self.nulls.append(False) self.assertEqual(self.columns,len(self.nulls))