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
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'}))
47
([], {'author': [], 'exclude': [], 'fixes': [], 'help': True,
48
'override_config': []}),
49
parse_args(cmd_commit(), ['--help']))
51
([], {'author': [], 'exclude': [], 'fixes': [], 'message': 'biter',
52
'override_config': []}),
53
parse_args(cmd_commit(), ['--message=biter']))
51
55
def test_no_more_opts(self):
52
56
"""Terminated options"""
53
self.assertEqual(parse_args(cmd_commit(), ['--', '-file-with-dashes']),
54
(['-file-with-dashes'], {'author': [], 'exclude': [], 'fixes': []}))
58
(['-file-with-dashes'], {'author': [], 'exclude': [], 'fixes': [],
59
'override_config': []}),
60
parse_args(cmd_commit(), ['--', '-file-with-dashes']))
56
62
def test_option_help(self):
57
63
"""Options have help strings."""