~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_msgeditor.py

  • Committer: Ross Lagerwall
  • Date: 2012-08-07 06:32:51 UTC
  • mto: (6437.63.5 2.5)
  • mto: This revision was merged to the branch mainline in revision 6558.
  • Revision ID: rosslagerwall@gmail.com-20120807063251-x9p03ghg2ws8oqjc
Add bzrlib/locale to .bzrignore

bzrlib/locale is generated with ./setup.py build_mo which is in turn called
by ./setup.py build

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2012, 2016 Canonical Ltd
 
1
# Copyright (C) 2005-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
26
26
    errors,
27
27
    msgeditor,
28
28
    osutils,
 
29
    tests,
29
30
    trace,
30
31
    )
31
32
from bzrlib.msgeditor import (
80
81
""")
81
82
 
82
83
    def make_multiple_pending_tree(self):
83
 
        config.GlobalStack().set('email', 'Bilbo Baggins <bb@hobbit.net>')
 
84
        from bzrlib import config
 
85
        config.GlobalConfig().set_user_option('email',
 
86
                                              'Bilbo Baggins <bb@hobbit.net>')
84
87
        tree = self.make_branch_and_tree('a')
85
88
        tree.commit('Initial checkin.', timestamp=1230912900, timezone=0)
86
89
        tree2 = tree.bzrdir.clone('b').open_workingtree()
351
354
        msgeditor.hooks.install_named_hook("set_commit_message",
352
355
                lambda commit_obj, existing_message: "save me some typing\n", None)
353
356
        commit_obj = commit.Commit()
354
 
        self.assertEqual("save me some typing\n",
 
357
        self.assertEquals("save me some typing\n",
355
358
            msgeditor.set_commit_message(commit_obj))
356
359
 
357
360
    def test_generate_commit_message_template_no_hooks(self):
363
366
        msgeditor.hooks.install_named_hook("commit_message_template",
364
367
                lambda commit_obj, msg: "save me some typing\n", None)
365
368
        commit_obj = commit.Commit()
366
 
        self.assertEqual("save me some typing\n",
 
369
        self.assertEquals("save me some typing\n",
367
370
            msgeditor.generate_commit_message_template(commit_obj))
368
371
 
369
372