698
698
self.assertRaises(RevisionNotPresent, check, ["c"])
699
699
self.assertRaises(RevisionNotPresent, check, ["a", "b", "c"])
701
def test_impossible_parent(self):
702
"""Test we get KnitCorrupt if the parent couldn't possibly exist."""
703
transport = MockTransport([
706
"b option 0 1 4 :" # We don't have a 4th record
708
self.assertRaises(errors.KnitCorrupt,
709
self.get_knit_index, transport, 'filename', 'r')
711
def test_corrupted_parent(self):
712
transport = MockTransport([
716
"c option 0 1 1v :", # Can't have a parent of '1v'
718
self.assertRaises(errors.KnitCorrupt,
719
self.get_knit_index, transport, 'filename', 'r')
721
def test_corrupted_parent_in_list(self):
722
transport = MockTransport([
726
"c option 0 1 2 v :", # Can't have a parent of 'v'
728
self.assertRaises(errors.KnitCorrupt,
729
self.get_knit_index, transport, 'filename', 'r')
702
732
class LowLevelKnitIndexTests_c(LowLevelKnitIndexTests):