~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-08-21 17:09:54 UTC
  • mfrom: (5385.1.1 trivial-NEWS-fileencoding)
  • Revision ID: pqm@pqm.ubuntu.com-20100821170954-efrj80bvw56s5mzc
(parthm) Remove 'encoding' option from NEWS modeline as its an error in Vim
 7.3+ (Parth Malwankar)

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
                           UnsupportedFormatError,
32
32
                           )
33
33
from bzrlib import (
34
 
    btree_index,
35
34
    graph,
36
35
    tests,
37
36
    )
682
681
 
683
682
class Test2a(tests.TestCaseWithMemoryTransport):
684
683
 
685
 
    def test_chk_bytes_uses_custom_btree_parser(self):
686
 
        mt = self.make_branch_and_memory_tree('test', format='2a')
687
 
        mt.lock_write()
688
 
        self.addCleanup(mt.unlock)
689
 
        mt.add([''], ['root-id'])
690
 
        mt.commit('first')
691
 
        index = mt.branch.repository.chk_bytes._index._graph_index._indices[0]
692
 
        self.assertEqual(btree_index._gcchk_factory, index._leaf_factory)
693
 
        # It should also work if we re-open the repo
694
 
        repo = mt.branch.repository.bzrdir.open_repository()
695
 
        repo.lock_read()
696
 
        self.addCleanup(repo.unlock)
697
 
        index = repo.chk_bytes._index._graph_index._indices[0]
698
 
        self.assertEqual(btree_index._gcchk_factory, index._leaf_factory)
699
 
 
700
684
    def test_fetch_combines_groups(self):
701
685
        builder = self.make_branch_builder('source', format='2a')
702
686
        builder.start_series()