1557
1557
self.assertRaises(RevisionNotPresent,
1558
1558
files.annotate, prefix + ('missing-key',))
1560
def test_get_annotator(self):
1561
files = self.get_versionedfiles()
1562
self.get_diamond_files(files)
1563
origin_key = self.get_simple_key('origin')
1564
base_key = self.get_simple_key('base')
1565
left_key = self.get_simple_key('left')
1566
right_key = self.get_simple_key('right')
1567
merged_key = self.get_simple_key('merged')
1568
# annotator = files.get_annotator()
1569
# introduced full text
1570
origins, lines = files.get_annotator().annotate(origin_key)
1571
self.assertEqual([(origin_key,)], origins)
1572
self.assertEqual(['origin\n'], lines)
1574
origins, lines = files.get_annotator().annotate(base_key)
1575
self.assertEqual([(base_key,)], origins)
1577
origins, lines = files.get_annotator().annotate(merged_key)
1586
# Without a graph everything is new.
1593
self.assertRaises(RevisionNotPresent,
1594
files.get_annotator().annotate, self.get_simple_key('missing-key'))
1560
1596
def test_construct(self):
1561
1597
"""Each parameterised test can be constructed on a transport."""
1562
1598
files = self.get_versionedfiles()