~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Marco Pantaleoni
  • Date: 2010-03-25 14:22:41 UTC
  • mto: This revision was merged to the branch mainline in revision 5174.
  • Revision ID: panta@elasticworld.org-20100325142241-vtl1hshva7uiz3ap
Applied suggestions from merge reviewer (John A Meinel):

- removed duplication of checks for presence of hooks.
- adapted to bazaar style guideline
- simplified test cases callback

Show diffs side-by-side

added added

removed removed

Lines of Context:
1343
1343
    def test_post_repo_init(self):
1344
1344
        from bzrlib.bzrdir import RepoInitHookParams
1345
1345
        calls = []
1346
 
        bzrdir.BzrDir.hooks.install_named_hook('post_repo_init', lambda params, c=calls: c.append(params), None)
 
1346
        bzrdir.BzrDir.hooks.install_named_hook('post_repo_init',
 
1347
            calls.append, None)
1347
1348
        self.make_repository('foo')
1348
1349
        self.assertLength(1, calls)
1349
1350
        params = calls[0]