diff options
author | Yaroslav Halchenko <debian@onerussian.com> | 2017-11-27 17:12:14 -0500 |
---|---|---|
committer | Yaroslav Halchenko <debian@onerussian.com> | 2017-11-27 17:12:14 -0500 |
commit | cd6e82cfa3bdc3b5d75317431d58cc6efb710b1d (patch) | |
tree | b657899669424caf0d762cdc00aec6ad3f67e184 /git/test/test_config.py | |
parent | a2cd130bed184fe761105d60edda6936f348edc6 (diff) | |
download | gitpython-cd6e82cfa3bdc3b5d75317431d58cc6efb710b1d.tar.gz |
BF: process included files before the rest
Diffstat (limited to 'git/test/test_config.py')
-rw-r--r-- | git/test/test_config.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/git/test/test_config.py b/git/test/test_config.py index 7cf9d317..c2bac0cb 100644 --- a/git/test/test_config.py +++ b/git/test/test_config.py @@ -15,6 +15,7 @@ from git.config import cp from git.test.lib import ( TestCase, fixture_path, + SkipTest, ) from git.test.lib import with_rw_directory @@ -88,6 +89,21 @@ class TestBase(TestCase): assert r_config.get(sname, oname) == val # END for each filename + def test_includes_order(self): + with GitConfigParser(map(fixture_path, ("git_config", "git_config_global"))) as r_config: + r_config.read() # enforce reading + # Simple inclusions, again checking them taking precedence + assert r_config.get_value('sec', 'var0') == "value0_included" + # This one should take the git_config_global value since included + # values must be considered as soon as they get them + assert r_config.get_value('diff', 'tool') == "meld" + try: + assert r_config.get_value('sec', 'var1') == "value1_main" + except AssertionError: + raise SkipTest( + 'Known failure -- included values are not in effect right away' + ) + @with_rw_directory def test_lock_reentry(self, rw_dir): fpl = osp.join(rw_dir, 'l') |