~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-09-26 15:40:02 UTC
  • mto: This revision was merged to the branch mainline in revision 6178.
  • Revision ID: v.ladeuil+lp@free.fr-20110926154002-exguk3psfpc4b2uw
Allow config options to be overridden from the command line

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
                commands_without_help.append(cmd_name)
45
45
        self.assertLength(0, commands_without_help)
46
46
 
 
47
    def test_command_see_config_overrides(self):
 
48
        class cmd_my_cmd(commands.Command):
 
49
 
 
50
            def run(self):
 
51
                c = config.GlobalStack()
 
52
                val = c.get('xx')
 
53
                return val
 
54
 
 
55
        cmd = cmd_my_cmd()
 
56
        self.assertEquals('12', cmd.run_argv_aliases(['-Oxx=12']))
 
57
 
47
58
    def test_display_command(self):
48
59
        """EPIPE message is selectively suppressed"""
49
60
        def pipe_thrower():