

def test_readers(self):
    target = [(0, 'A', 4, 6), (0, 'B', 2, 2), (0, 'C', 2, 2), (0, 'D', 1, 1), (0, 'E', 2, 2), (0, 'F', 1, 1), (1, '1', 3, 3), (1, '2', 3, 3), (1, '3', 2, 2), (1, '4', 2, 2), (1, '5', 2, 2), (1, '6', 2, 2), (2, 'Q', 2, 2), (2, 'R', 2, 2), (2, 'S', 2, 2), (2, 'X', 3, 3), (2, 'Y', 3, 3), (2, 'Z', 2, 2)]
    stored = [{
        'f1': 'A B C',
    }, {
        'f1': 'D E F',
    }, {
        'f1': 'A E C',
    }, {
        'f1': 'A A A',
    }, {
        'f1': 'A B',
    }]

    def t(ix):
        tr = ix.term_reader()
        self.assertEqual(list(tr), target)
        dr = ix.doc_reader()
        self.assertEqual(list(dr), stored)
    ix = self._one_segment_index()
    self.assertEqual(len(ix.segments), 1)
    t(ix)
    ix = ix._multi_segment_index()
    self.assertEqual(len(ix.segments), 3)
    t(ix)

dataset/ETHPy150Open tallstreet/Whoosh-AppEngine/tests/test_reading.py TestReading.test_readers/VarMisuse@322/415 `self`->`ix`