From 7d00fa4f6cad398250ce868cef34357b45abaad3 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 3 Dec 2009 17:43:40 +0100 Subject: config: implemented get_value method to have a safe way to make general queries to the git configuration, returning a value in the proper type. In a way its not supposed to be used as you should know the type of your configuration option or get an exception otherwise --- test/git/test_config.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/git') diff --git a/test/git/test_config.py b/test/git/test_config.py index c2909b8f..4b6c4f11 100644 --- a/test/git/test_config.py +++ b/test/git/test_config.py @@ -72,6 +72,8 @@ class TestBase(TestCase): for option in r_config.options(section): num_options += 1 val = r_config.get(section, option) + val_typed = r_config.get_value(section, option) + assert isinstance(val_typed, (bool, long, float, basestring)) assert val assert "\n" not in option assert "\n" not in val -- cgit v1.2.1