~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_msgeditor.py

  • Committer: Vincent Ladeuil
  • Date: 2010-01-26 10:17:22 UTC
  • mfrom: (4985.1.5 add-attr-cleanup)
  • mto: This revision was merged to the branch mainline in revision 4988.
  • Revision ID: v.ladeuil+lp@free.fr-20100126101722-y213sv39buw3dgi2
Implement TestCase.overrideAttr to simplify tests setUp/cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
360
360
            msgeditor.generate_commit_message_template(commit_obj))
361
361
 
362
362
    def test_generate_commit_message_template_hook(self):
363
 
        def restoreDefaults():
364
 
            msgeditor.hooks['commit_message_template'] = []
365
 
        self.addCleanup(restoreDefaults)
366
363
        msgeditor.hooks.install_named_hook("commit_message_template",
367
364
                lambda commit_obj, msg: "save me some typing\n", None)
368
365
        commit_obj = commit.Commit()