/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_shared_repository.py

  • Committer: Marco Pantaleoni
  • Date: 2010-03-25 18:02:45 UTC
  • mto: This revision was merged to the branch mainline in revision 5174.
  • Revision ID: panta@elasticworld.org-20100325180245-1lt7v5stt13m92tr
Documented behaviour of 'post_branch_init' for lightweight checkouts.

Added blackbox tests for the three hooks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
        self.assertRaises(errors.NoRepositoryPresent, dir.open_repository)
139
139
        e = self.assertRaises(errors.NotBranchError, dir.open_branch)
140
140
        self.assertNotContainsRe(str(e), "location is a repository")
 
141
 
 
142
    def test_init_repo_with_post_repo_init_hook(self):
 
143
        calls = []
 
144
        BzrDir.hooks.install_named_hook('post_repo_init', calls.append, None)
 
145
        self.assertLength(0, calls)
 
146
        self.run_bzr("init-repository a")
 
147
        self.assertLength(1, calls)