def test_read(self): table = test_table(1000) buf = bson_dataframe.write_table(table) ret = bson_dataframe.read_table(buf) self.assertTrue(ret.equals(table))
def test_slice_tail(self): table = test_table(1000, offset=500, length=500) buf = bson_dataframe.write_table(table) ret = bson_dataframe.read_table(buf) self.assertTrue(ret.equals(table))
def test_write(self): table = test_table(1000) buf = bson_dataframe.write_table(table) doc = bson_dataframe.validate(bson_dataframe.write_table(table)) with open('test.json', 'w') as out: out.write(doc)