~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_index.py

  • Committer: Robert Collins
  • Date: 2007-07-12 13:51:40 UTC
  • mto: (2592.5.3 pack-repository)
  • mto: This revision was merged to the branch mainline in revision 2624.
  • Revision ID: robertc@robertcollins.net-20070712135140-6y4vgazp2dsrz45b
Record the number of node reference lists a particular index has.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
        builder = GraphIndexBuilder()
28
28
        stream = builder.finish()
29
29
        contents = stream.read()
30
 
        self.assertEqual("Bazaar Graph Index 1\n\n", contents)
 
30
        self.assertEqual("Bazaar Graph Index 1\nnode_ref_lists=0\n\n", contents)
 
31
 
 
32
    def test_build_index_one_reference_list_empty(self):
 
33
        builder = GraphIndexBuilder(reference_lists=1)
 
34
        stream = builder.finish()
 
35
        contents = stream.read()
 
36
        self.assertEqual("Bazaar Graph Index 1\nnode_ref_lists=1\n\n", contents)
31
37
 
32
38
 
33
39
class TestGraphIndex(TestCaseWithMemoryTransport):
36
42
        builder = GraphIndexBuilder()
37
43
        stream = builder.finish()
38
44
        trans = self.get_transport()
39
 
        trans.put('index', stream.read())
 
45
        trans.put_file('index', stream)
40
46
        return GraphIndex(trans, 'index')
41
47
 
42
48
    def test_iter_all_entries_empty(self):