def pop_range(self, byrank, ts, start, end, num_popped, sl, sl2=None):
        all_dates, all_fields = yield ts.irange()
        self.assertEqual(len(all_fields), 6)
        if byrank:
            dates, fields = yield ts.irange(start, end)
            dt, fs = yield ts.ipop_range(start, end)
        else:
            dates, fields = yield ts.range(start, end)
            dt, fs = yield ts.pop_range(start, end)
        self.assertEqual(len(dt), num_popped)
        size = yield ts.size()
        self.assertEqual(size, len(all_dates)-num_popped)
        self.assertEqual(dates, dt)
        self.assertEqual(fields, fs)
        #
        dates = all_dates[sl]
        fields = dict(((f, all_fields[f][sl]) for f in all_fields))
        if sl2:
            dates.extend(all_dates[sl2])
            for f in fields:
                fields[f].extend(all_fields[f][sl2])
        dt, fs = yield ts.irange()
        self.assertEqual(len(dates), len(dt))
        self.assertEqual(dates, dt)
        for f in fields:
            self.assertEqual(len(fields[f]), len(fs[f]))
        self.assertEqual(fields, fs)
dataset/ETHPy150Open lsbardel/python-stdnet/tests/all/apps/columnts/manipulate.py/TestManipulate.pop_range/original