diff options
Diffstat (limited to 'tests/test_Config.py')
-rw-r--r-- | tests/test_Config.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_Config.py b/tests/test_Config.py index 3f19dc5..9fe7dd4 100644 --- a/tests/test_Config.py +++ b/tests/test_Config.py @@ -59,3 +59,24 @@ def test_tristate(): >>> options.color auto """ + +def test_parser_fallback(): + """ + Make sure we also parse git-<subcommands> sections if + gbp <subcommand> was used. + + >>> import os + >>> from gbp.config import GbpOptionParser + >>> parser = GbpOptionParser('foo') + >>> tmpdir = str(context.new_tmpdir('foo')) + >>> confname = os.path.join(tmpdir, 'gbp.conf') + >>> parser.config_files = [confname] + >>> f = file(confname, 'w') + >>> f.write('[foo]\\nthere = is\\n[git-foo]\\nno = truth\\n') + >>> f.close() + >>> parser._parse_config_files() + >>> parser.config['there'] + 'is' + >>> parser.config['no'] + 'truth' + """ |