~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_msgeditor.py

(vila) Revise legal option names to be less drastic. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    errors,
27
27
    msgeditor,
28
28
    osutils,
29
 
    tests,
30
29
    trace,
31
30
    )
32
31
from bzrlib.msgeditor import (
34
33
    edit_commit_message_encoded
35
34
)
36
35
from bzrlib.tests import (
 
36
    features,
37
37
    TestCaseInTempDir,
38
38
    TestCaseWithTransport,
39
39
    TestNotApplicable,
80
80
""")
81
81
 
82
82
    def make_multiple_pending_tree(self):
83
 
        from bzrlib import config
84
 
        config.GlobalConfig().set_user_option('email',
85
 
                                              'Bilbo Baggins <bb@hobbit.net>')
 
83
        config.GlobalStack().set('email', 'Bilbo Baggins <bb@hobbit.net>')
86
84
        tree = self.make_branch_and_tree('a')
87
85
        tree.commit('Initial checkin.', timestamp=1230912900, timezone=0)
88
86
        tree2 = tree.bzrdir.clone('b').open_workingtree()
251
249
        self.overrideEnv('VISUAL', 'visual')
252
250
        self.overrideEnv('EDITOR', 'editor')
253
251
 
254
 
        conf = config.GlobalConfig.from_string('editor = config_editor\n',
255
 
                                               save=True)
256
 
 
 
252
        conf = config.GlobalStack()
 
253
        conf.store._load_from_string('[DEFAULT]\neditor = config_editor\n')
 
254
        conf.store.save()
257
255
        editors = list(msgeditor._get_editor())
258
256
        editors = [editor for (editor, cfg_src) in editors]
259
257
 
309
307
        self.assertFileEqual(expected, msgfilename)
310
308
 
311
309
    def test__create_temp_file_with_commit_template_in_unicode_dir(self):
312
 
        self.requireFeature(tests.UnicodeFilenameFeature)
 
310
        self.requireFeature(features.UnicodeFilenameFeature)
313
311
        if hasattr(self, 'info'):
314
312
            tmpdir = self.info['directory']
315
313
            os.mkdir(tmpdir)