~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_msgeditor.py

  • Committer: Martin von Gagern
  • Date: 2011-06-01 12:53:56 UTC
  • mto: This revision was merged to the branch mainline in revision 6009.
  • Revision ID: martin.vgagern@gmx.net-20110601125356-lwozv2vecea6hxfz
Change from no_decorate to classify as name for the argument.

The command line switch remains as --no-classify, to keep backwards
compatibility.  Users are free to include --no-classify in an alias, and
still use --classify to change back.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    edit_commit_message_encoded
35
35
)
36
36
from bzrlib.tests import (
37
 
    features,
38
37
    TestCaseInTempDir,
39
38
    TestCaseWithTransport,
40
39
    TestNotApplicable,
310
309
        self.assertFileEqual(expected, msgfilename)
311
310
 
312
311
    def test__create_temp_file_with_commit_template_in_unicode_dir(self):
313
 
        self.requireFeature(features.UnicodeFilenameFeature)
 
312
        self.requireFeature(tests.UnicodeFilenameFeature)
314
313
        if hasattr(self, 'info'):
315
314
            tmpdir = self.info['directory']
316
315
            os.mkdir(tmpdir)
345
344
        self.assertRaises(errors.BadCommitMessageEncoding,
346
345
                          msgeditor.edit_commit_message, '')
347
346
 
348
 
    def test_set_commit_message_no_hooks(self):
349
 
        commit_obj = commit.Commit()
350
 
        self.assertIs(None,
351
 
            msgeditor.set_commit_message(commit_obj))
352
 
 
353
 
    def test_set_commit_message_hook(self):
354
 
        msgeditor.hooks.install_named_hook("set_commit_message",
355
 
                lambda commit_obj, existing_message: "save me some typing\n", None)
356
 
        commit_obj = commit.Commit()
357
 
        self.assertEquals("save me some typing\n",
358
 
            msgeditor.set_commit_message(commit_obj))
359
 
 
360
347
    def test_generate_commit_message_template_no_hooks(self):
361
348
        commit_obj = commit.Commit()
362
349
        self.assertIs(None,