diff options
Diffstat (limited to 'test/git')
-rw-r--r-- | test/git/test_config.py | 4 | ||||
-rw-r--r-- | test/git/test_remote.py | 1 |
2 files changed, 5 insertions, 0 deletions
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") + diff --git a/test/git/test_remote.py b/test/git/test_remote.py index edbf758c..a9ca8331 100644 --- a/test/git/test_remote.py +++ b/test/git/test_remote.py @@ -358,6 +358,7 @@ class TestRemote(TestBase): val = getattr(remote, opt) reader = remote.config_reader assert reader.get(opt) == val + assert reader.get_value(opt, None) == val # unable to write with a reader self.failUnlessRaises(IOError, reader.set, opt, "test") |