~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_index.py

  • Committer: John Arbash Meinel
  • Date: 2009-08-11 17:03:07 UTC
  • mto: This revision was merged to the branch mainline in revision 4613.
  • Revision ID: john@arbash-meinel.com-20090811170307-31ip7d2lswbbcr3w
Snapshot the work in progress.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1394
1394
                         parent_map)
1395
1395
        self.assertEqual(set([key3]), missing_keys)
1396
1396
 
 
1397
    def test_get_ancestry_empty_index(self):
 
1398
        index = self.make_index(ref_lists=1, key_elements=1, nodes=[])
 
1399
        parent_map = {}
 
1400
        missing_keys = set()
 
1401
        search_keys = index.get_ancestry([('one',), ('two',)], 0, parent_map,
 
1402
                                         missing_keys)
 
1403
        self.assertEqual(set(), search_keys)
 
1404
        self.assertEqual({}, parent_map)
 
1405
        self.assertEqual(set([('one',), ('two',)]), missing_keys)
 
1406
 
1397
1407
 
1398
1408
class TestInMemoryGraphIndex(TestCaseWithMemoryTransport):
1399
1409