~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_btree_index.py

  • Committer: Martin Packman
  • Date: 2012-01-05 09:50:04 UTC
  • mfrom: (6424 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6426.
  • Revision ID: martin.packman@canonical.com-20120105095004-mia9xb7y0efmto0v
Merge bzr.dev to resolve conflicts in bzrlib.builtins

Show diffs side-by-side

added added

removed removed

Lines of Context:
831
831
            btree_index.BTreeGraphIndex(t1, 'index', 10) !=
832
832
            btree_index.BTreeGraphIndex(t1, 'index', 20))
833
833
 
 
834
    def test_key_too_big(self):
 
835
        # the size that matters here is the _compressed_ size of the key, so we can't
 
836
        # do a simple character repeat.
 
837
        bigKey = ''.join(map(repr, xrange(btree_index._PAGE_SIZE)))
 
838
        self.assertRaises(errors.BadIndexKey,
 
839
                          self.make_index,
 
840
                          nodes=[((bigKey,), 'value', ())])
 
841
        
834
842
    def test_iter_all_only_root_no_size(self):
835
843
        self.make_index(nodes=[(('key',), 'value', ())])
836
844
        t = transport.get_transport_from_url('trace+' + self.get_url(''))