aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/18_test_Config.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2015-05-04 19:13:42 +0200
committerGuido Günther <agx@sigxcpu.org>2015-05-05 08:51:45 +0200
commit5280d82e2bfaa8723246df0178d67615400a4d78 (patch)
tree6044d284b849fb1c65d3f31c13a90d35d48851e7 /tests/18_test_Config.py
parent270f41b0362f8dde74a406deab32d63f192b6490 (diff)
Fixup indentation
to make pylint happy Gbp-Dch: Ignore
Diffstat (limited to 'tests/18_test_Config.py')
-rw-r--r--tests/18_test_Config.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/18_test_Config.py b/tests/18_test_Config.py
index 00d156fe..33373607 100644
--- a/tests/18_test_Config.py
+++ b/tests/18_test_Config.py
@@ -5,6 +5,7 @@ import unittest
from gbp.config import GbpOptionParser, GbpOptionGroup
from .testutils import GbpLogTester
+
class TestConfigParser(unittest.TestCase, GbpLogTester):
def __init__(self, methodName='runTest'):
unittest.TestCase.__init__(self, methodName)
@@ -26,8 +27,8 @@ class TestConfigParser(unittest.TestCase, GbpLogTester):
"""
A value only in the default section should be available in all commands
"""
- for n in range(1,5):
- for prefix in [ '', 'git-', 'gbp-' ]:
+ for n in range(1, 5):
+ for prefix in ['', 'git-', 'gbp-']:
parser = GbpOptionParser('%scmd%d' % (prefix, n))
self.assertEqual(parser.config['default_option'], 'default_default1')
@@ -35,7 +36,7 @@ class TestConfigParser(unittest.TestCase, GbpLogTester):
"""
A value in any command section should override the default
"""
- for prefix in [ '', 'git-', 'gbp-' ]:
+ for prefix in ['', 'git-', 'gbp-']:
parser = GbpOptionParser('%scmd1' % prefix)
self.assertEqual(parser.config['single_override_option1'], 'single_override_value1')
# No deprecation warning since the test1.conf section is [cmd1]
@@ -45,20 +46,20 @@ class TestConfigParser(unittest.TestCase, GbpLogTester):
"""
A value in any git-command section should override the default
"""
- for prefix in [ '', 'git-' ]:
+ for prefix in ['', 'git-']:
parser = GbpOptionParser('%scmd2' % prefix)
self.assertEqual(parser.config['single_git_override_option1'], 'single_git_override_value1')
- for line in range(0,2):
+ for line in range(0, 2):
self._check_log(line, ".*Old style config section \[git-cmd2\] found please rename to \[cmd2\]")
def test_single_gbp_override(self):
"""
A value in any gbp-command section should override the default
"""
- for prefix in [ '', 'gbp-' ]:
+ for prefix in ['', 'gbp-']:
parser = GbpOptionParser('%scmd3' % prefix)
self.assertEqual(parser.config['single_gbp_override_option1'], 'single_gbp_override_value1')
- for line in range(0,2):
+ for line in range(0, 2):
self._check_log(line, ".*Old style config section \[gbp-cmd3\] found please rename to \[cmd3\]")
@@ -68,7 +69,7 @@ class TestConfigParser(unittest.TestCase, GbpLogTester):
how we're invoked
"""
for n in range(4, 6):
- for prefix in [ '', 'git-']:
+ for prefix in ['', 'git-']:
cmd = '%scmd%d' % (prefix, n)
parser = GbpOptionParser(cmd)
actual = parser.config['new_overrides_git_option1']