~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_index.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-02-23 17:00:36 UTC
  • mfrom: (4032.1.4 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090223170036-3q1v68ewdt8i0to5
(Marius Kruger) Remove all trailing whitespace and add tests to
        enforce this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
558
558
        # not create a new transport request, and should return False (cannot
559
559
        # be in the index) - even when the byte location we ask for is outside
560
560
        # the parsed region
561
 
        # 
 
561
        #
562
562
        result = index._lookup_keys_via_location([(4000, self.make_key(40))])
563
563
        self.assertEqual(
564
564
            [((4000, self.make_key(40)),
1078
1078
        self.assertEqual(set([(index1, ('name', ), 'data', ((('ref', ), ), )),
1079
1079
            (index2, ('ref', ), 'refdata', ((), ))]),
1080
1080
            set(index.iter_entries([('name', ), ('ref', )])))
1081
 
 
 
1081
 
1082
1082
    def test_iter_all_keys_dup_entry(self):
1083
1083
        index1 = self.make_index('1', 1, nodes=[
1084
1084
            (('name', ), 'data', ([('ref', )], )),
1089
1089
        self.assertEqual(set([(index1, ('name', ), 'data', ((('ref',),),)),
1090
1090
            (index1, ('ref', ), 'refdata', ((), ))]),
1091
1091
            set(index.iter_entries([('name', ), ('ref', )])))
1092
 
 
 
1092
 
1093
1093
    def test_iter_missing_entry_empty(self):
1094
1094
        index = CombinedGraphIndex([])
1095
1095
        self.assertEqual([], list(index.iter_entries([('a', )])))
1104
1104
        index2 = self.make_index('2')
1105
1105
        index = CombinedGraphIndex([index1, index2])
1106
1106
        self.assertEqual([], list(index.iter_entries([('a', )])))
1107
 
 
 
1107
 
1108
1108
    def test_iter_entry_present_one_index_only(self):
1109
1109
        index1 = self.make_index('1', nodes=[(('key', ), '', ())])
1110
1110
        index2 = self.make_index('2', nodes=[])