~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_config.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-31 21:50:47 UTC
  • mfrom: (5743.13.15 config-editor-option)
  • Revision ID: pqm@pqm.ubuntu.com-20110531215047-sxah2raqyplbxwcw
(vila) Migrate 'editor' to the new config scheme. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    trace,
42
42
    transport,
43
43
    )
 
44
from bzrlib.symbol_versioning import (
 
45
    deprecated_in,
 
46
    deprecated_method,
 
47
    )
44
48
from bzrlib.transport import remote
45
49
from bzrlib.tests import (
46
50
    features,
474
478
        config.Config()
475
479
 
476
480
    def test_no_default_editor(self):
477
 
        self.assertRaises(NotImplementedError, config.Config().get_editor)
 
481
        self.assertRaises(
 
482
            NotImplementedError,
 
483
            self.applyDeprecated, deprecated_in((2, 4, 0)),
 
484
            config.Config().get_editor)
478
485
 
479
486
    def test_user_email(self):
480
487
        my_config = InstrumentedConfig()
1188
1195
 
1189
1196
    def test_configured_editor(self):
1190
1197
        my_config = config.GlobalConfig.from_string(sample_config_text)
1191
 
        self.assertEqual("vim", my_config.get_editor())
 
1198
        editor = self.applyDeprecated(
 
1199
            deprecated_in((2, 4, 0)), my_config.get_editor)
 
1200
        self.assertEqual('vim', editor)
1192
1201
 
1193
1202
    def test_signatures_always(self):
1194
1203
        my_config = config.GlobalConfig.from_string(sample_always_signatures)