From a97d21936200f1221d8ddd89202042faed1b9bcb Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 9 Dec 2009 21:38:12 +0100 Subject: config: fixed incorrect handling of default value in get_value remote.config: SectionConstraint now knows about set_value and get_value which are new to the GitConfigParser --- test/git/test_config.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/git/test_config.py') diff --git a/test/git/test_config.py b/test/git/test_config.py index 6103ab8d..407eb9bd 100644 --- a/test/git/test_config.py +++ b/test/git/test_config.py @@ -8,6 +8,7 @@ from test.testlib import * from git import * import StringIO from copy import copy +from ConfigParser import NoSectionError class TestBase(TestCase): @@ -97,4 +98,7 @@ class TestBase(TestCase): default = "my default value" assert r_config.get_value("doesnt", "exist", default) == default + # it raises if there is no default though + self.failUnlessRaises(NoSectionError, r_config.get_value, "doesnt", "exist") + -- cgit v1.2.3