~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-13 07:29:51 UTC
  • mto: (2592.5.3 pack-repository)
  • mto: This revision was merged to the branch mainline in revision 2624.
  • Revision ID: robertc@robertcollins.net-20070713072951-zyno1jr1tjyo819y
Empty values are ok.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
        self.assertEqual("Bazaar Graph Index 1\nnode_ref_lists=0\n"
50
50
            "akey\0\0\0data\n\n", contents)
51
51
 
 
52
    def test_add_node_empty_value(self):
 
53
        builder = GraphIndexBuilder()
 
54
        builder.add_node('akey', (), '')
 
55
        stream = builder.finish()
 
56
        contents = stream.read()
 
57
        self.assertEqual("Bazaar Graph Index 1\nnode_ref_lists=0\n"
 
58
            "akey\0\0\0\n\n", contents)
 
59
 
52
60
    def test_build_index_two_nodes_sorted_reverse(self):
53
61
        # the highest sorted node comes first.
54
62
        builder = GraphIndexBuilder()