aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/18_test_Config.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2015-05-04 18:54:33 +0200
committerGuido Günther <agx@sigxcpu.org>2015-05-05 08:51:45 +0200
commitf22785b525077d8f4cbac1d674b6cb8af6fb28b1 (patch)
treea46004afedf8430c57f88286f01490648b5f2ae1 /tests/18_test_Config.py
parent5280d82e2bfaa8723246df0178d67615400a4d78 (diff)
Allow to disable config section deprecations
Config section deprecations can be disabled by setting GBP_DISABLE_SECTION_DEPRECTATION=true in the environment.
Diffstat (limited to 'tests/18_test_Config.py')
-rw-r--r--tests/18_test_Config.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/18_test_Config.py b/tests/18_test_Config.py
index 33373607..306999f3 100644
--- a/tests/18_test_Config.py
+++ b/tests/18_test_Config.py
@@ -62,6 +62,17 @@ class TestConfigParser(unittest.TestCase, GbpLogTester):
for line in range(0, 2):
self._check_log(line, ".*Old style config section \[gbp-cmd3\] found please rename to \[cmd3\]")
+ def test_single_git_override_disabled_deprecations(self):
+ """
+ With disabled deprecations we shouldn't see a log line
+ """
+ for prefix in ['', 'git-']:
+ os.environ['GBP_DISABLE_SECTION_DEPRECTATION'] = 'true'
+ parser = GbpOptionParser('%scmd2' % prefix)
+ self.assertEqual(parser.config['single_git_override_option1'], 'single_git_override_value1')
+ for line in range(0, 2):
+ self._check_log_empty()
+ os.environ.pop('GBP_DISABLE_SECTION_DEPRECTATION')
def test_new_overrides_git(self):
"""