~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

  • Committer: Patch Queue Manager
  • Date: 2011-09-29 16:16:31 UTC
  • mfrom: (6161.1.6 491196-cmdline-options)
  • Revision ID: pqm@pqm.ubuntu.com-20110929161631-39y752x3cwcljl5w
(vila) Allow configuration options to be overridden from the command line.
 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
        # XXX: Using cmd_commit makes these tests overly sensitive to changes
44
44
        # to cmd_commit, when they are meant to be about option parsing in
45
45
        # general.
46
 
        self.assertEqual(parse_args(cmd_commit(), ['--help']),
47
 
           ([], {'author': [], 'exclude': [], 'fixes': [], 'help': True}))
48
 
        self.assertEqual(parse_args(cmd_commit(), ['--message=biter']),
49
 
           ([], {'author': [], 'exclude': [], 'fixes': [], 'message': 'biter'}))
 
46
        self.assertEqual(
 
47
           ([], {'author': [], 'exclude': [], 'fixes': [], 'help': True}),
 
48
           parse_args(cmd_commit(), ['--help']))
 
49
        self.assertEqual(
 
50
           ([], {'author': [], 'exclude': [], 'fixes': [], 'message': 'biter'}),
 
51
           parse_args(cmd_commit(), ['--message=biter']))
50
52
 
51
53
    def test_no_more_opts(self):
52
54
        """Terminated options"""
53
 
        self.assertEqual(parse_args(cmd_commit(), ['--', '-file-with-dashes']),
54
 
                          (['-file-with-dashes'], {'author': [], 'exclude': [], 'fixes': []}))
 
55
        self.assertEqual(
 
56
            (['-file-with-dashes'], {'author': [], 'exclude': [], 'fixes': []}),
 
57
            parse_args(cmd_commit(), ['--', '-file-with-dashes']))
55
58
 
56
59
    def test_option_help(self):
57
60
        """Options have help strings."""