~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commands.py

  • Committer: Vincent Ladeuil
  • Date: 2011-02-10 12:37:27 UTC
  • mto: This revision was merged to the branch mainline in revision 5661.
  • Revision ID: v.ladeuil+lp@free.fr-20110210123727-8e0pu4wtlt6fj7nf
thread is already a python module, avoid confusion and use cethread instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
        self.assertContainsRe(c.get_help_text(), '--foo')
92
92
 
93
93
 
94
 
class TestInvokedAs(tests.TestCase):
95
 
 
96
 
    def test_invoked_as(self):
97
 
        """The command object knows the actual name used to invoke it."""
98
 
        commands.install_bzr_command_hooks()
99
 
        commands._register_builtin_commands()
100
 
        # get one from the real get_cmd_object.
101
 
        c = commands.get_cmd_object('ci')
102
 
        self.assertIsInstance(c, builtins.cmd_commit)
103
 
        self.assertEquals(c.invoked_as, 'ci')
104
 
 
105
 
 
106
94
class TestGetAlias(tests.TestCase):
107
95
 
108
96
    def _get_config(self, config_text):
354
342
        cmds = list(commands.all_command_names())
355
343
        self.assertEqual(['called'], hook_calls)
356
344
        self.assertSubset(['foo', 'bar'], cmds)
 
345
 
 
346
 
 
347
class TestDeprecations(tests.TestCase):
 
348
 
 
349
    def test_shlex_split_unicode_deprecation(self):
 
350
        res = self.applyDeprecated(
 
351
                symbol_versioning.deprecated_in((2, 2, 0)),
 
352
                commands.shlex_split_unicode, 'whatever')