From c1b86a232383748811c6faf17f364e63e10f7dd4 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 14 Nov 2012 11:36:51 +0900 Subject: Fix inconsistent indentation The repo coding style is to indent at 2 characters, but there are many places where this is not followed. Enable pylint warning "W0311: Bad indentation" and make sure all indentation is at multiples of 2 characters. Change-Id: I68f0f64470789ce2429ab11104d15d380a63e6a8 --- tests/test_git_config.py | 82 ++++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 41 deletions(-) (limited to 'tests/test_git_config.py') diff --git a/tests/test_git_config.py b/tests/test_git_config.py index 5b1770e7..3d4b9970 100644 --- a/tests/test_git_config.py +++ b/tests/test_git_config.py @@ -4,49 +4,49 @@ import unittest import git_config def fixture(*paths): - """Return a path relative to test/fixtures. - """ - return os.path.join(os.path.dirname(__file__), 'fixtures', *paths) + """Return a path relative to test/fixtures. + """ + return os.path.join(os.path.dirname(__file__), 'fixtures', *paths) class GitConfigUnitTest(unittest.TestCase): - """Tests the GitConfig class. + """Tests the GitConfig class. + """ + def setUp(self): + """Create a GitConfig object using the test.gitconfig fixture. + """ + config_fixture = fixture('test.gitconfig') + self.config = git_config.GitConfig(config_fixture) + + def test_GetString_with_empty_config_values(self): + """ + Test config entries with no value. + + [section] + empty + + """ + val = self.config.GetString('section.empty') + self.assertEqual(val, None) + + def test_GetString_with_true_value(self): + """ + Test config entries with a string value. + + [section] + nonempty = true + + """ + val = self.config.GetString('section.nonempty') + self.assertEqual(val, 'true') + + def test_GetString_from_missing_file(self): + """ + Test missing config file """ - def setUp(self): - """Create a GitConfig object using the test.gitconfig fixture. - """ - config_fixture = fixture('test.gitconfig') - self.config = git_config.GitConfig(config_fixture) - - def test_GetString_with_empty_config_values(self): - """ - Test config entries with no value. - - [section] - empty - - """ - val = self.config.GetString('section.empty') - self.assertEqual(val, None) - - def test_GetString_with_true_value(self): - """ - Test config entries with a string value. - - [section] - nonempty = true - - """ - val = self.config.GetString('section.nonempty') - self.assertEqual(val, 'true') - - def test_GetString_from_missing_file(self): - """ - Test missing config file - """ - config_fixture = fixture('not.present.gitconfig') - config = git_config.GitConfig(config_fixture) - val = config.GetString('empty') - self.assertEqual(val, None) + config_fixture = fixture('not.present.gitconfig') + config = git_config.GitConfig(config_fixture) + val = config.GetString('empty') + self.assertEqual(val, None) if __name__ == '__main__': - unittest.main() + unittest.main() -- cgit v1.2.3-54-g00ecf