From 5b3b65287e6849628066d5b9d08ec40c260a94dc Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 7 Jun 2011 19:58:06 +0200 Subject: Greatly improved robustness of config parser - it can now take pretty much everything. Includes an updated config file which includes all the new additions --- git/test/test_config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'git/test/test_config.py') diff --git a/git/test/test_config.py b/git/test/test_config.py index 173e380c..b397b193 100644 --- a/git/test/test_config.py +++ b/git/test/test_config.py @@ -30,7 +30,9 @@ class TestBase(TestCase): w_config.read() # enforce reading assert w_config._sections w_config.write() # enforce writing - assert file_obj.getvalue() == file_obj_orig.getvalue() + + # we stripped lines when reading, so the results differ + assert file_obj.getvalue() != file_obj_orig.getvalue() # creating an additional config writer must fail due to exclusive access self.failUnlessRaises(IOError, GitConfigParser, file_obj, read_only = False) @@ -56,10 +58,10 @@ class TestBase(TestCase): file_obj.seek(0) r_config = GitConfigParser(file_obj, read_only=True) + #print file_obj.getvalue() assert r_config.has_section(sname) assert r_config.has_option(sname, oname) assert r_config.get(sname, oname) == val - # END for each filename def test_base(self): -- cgit v1.2.1