1372
1372
# they do not have compression children of their own.
1373
1373
self.assertEqual({}, ann._content_objects)
1375
def test__expand_delta_records_blocks(self):
1376
ann = self.make_annotator()
1377
rev_key = ('rev-id',)
1378
parent_key = ('parent-id',)
1379
record = ['0,1,1\n', 'new-line\n']
1380
details = ('line-delta', True)
1381
ann._num_compression_children[parent_key] = 2
1382
ann._expand_record(parent_key, (), None,
1383
['line1\n', 'line2\n', 'line3\n'],
1384
('fulltext', False))
1385
ann._expand_record(rev_key, (parent_key,), parent_key, record, details)
1386
self.assertEqual({rev_key: [(1, 1, 1), (3, 3, 0)]},
1387
ann._left_matching_blocks)
1388
rev2_key = ('rev2-id',)
1389
record = ['0,1,1\n', 'new-line\n']
1390
details = ('line-delta', False)
1391
ann._expand_record(rev2_key, (parent_key,), parent_key, record, details)
1392
self.assertEqual([(1, 1, 2), (3, 3, 0)],
1393
ann._left_matching_blocks[rev2_key])
1375
1395
def test__process_pending(self):
1376
1396
ann = self.make_annotator()
1377
1397
rev_key = ('rev-id',)