~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commands.py

  • Committer: Zearin
  • Date: 2010-11-12 22:08:18 UTC
  • mto: (5570.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5572.
  • Revision ID: zearin@users.sourceforge.net-20101112220818-mb62len4zyxr8qvd
Fixed capitalization of XML and HTTP.  Fixed by hand and only where appropriate (e.g., left http://some/url lowercase, but capitalized "When making an HTTP request…").

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
from cStringIO import StringIO
18
18
import errno
 
19
import inspect
19
20
import sys
20
21
 
21
22
from bzrlib import (
33
34
 
34
35
class TestCommands(tests.TestCase):
35
36
 
 
37
    def test_all_commands_have_help(self):
 
38
        commands._register_builtin_commands()
 
39
        commands_without_help = set()
 
40
        base_doc = inspect.getdoc(commands.Command)
 
41
        for cmd_name in commands.all_command_names():
 
42
            cmd = commands.get_cmd_object(cmd_name)
 
43
            cmd_help = cmd.help()
 
44
            if not cmd_help or cmd_help == base_doc:
 
45
                commands_without_help.append(cmd_name)
 
46
        self.assertLength(0, commands_without_help)
 
47
 
36
48
    def test_display_command(self):
37
49
        """EPIPE message is selectively suppressed"""
38
50
        def pipe_thrower():
83
95
class TestGetAlias(tests.TestCase):
84
96
 
85
97
    def _get_config(self, config_text):
86
 
        my_config = config.GlobalConfig()
87
 
        config_file = StringIO(config_text.encode('utf-8'))
88
 
        my_config._parser = my_config._get_parser(file=config_file)
 
98
        my_config = config.GlobalConfig.from_string(config_text)
89
99
        return my_config
90
100
 
91
101
    def test_simple(self):
334
344
        self.assertEqual(['called'], hook_calls)
335
345
        self.assertSubset(['foo', 'bar'], cmds)
336
346
 
 
347
 
337
348
class TestDeprecations(tests.TestCase):
338
349
 
339
350
    def test_shlex_split_unicode_deprecation(self):