diff options
Diffstat (limited to 'test/git/test_repo.py')
-rw-r--r-- | test/git/test_repo.py | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/test/git/test_repo.py b/test/git/test_repo.py index 87332067..0d8a473d 100644 --- a/test/git/test_repo.py +++ b/test/git/test_repo.py @@ -8,9 +8,11 @@ import os, sys from test.testlib import * from git import * -class TestRepo(object): - def setup(self): - self.repo = Repo(GIT_REPO) +class TestRepo(TestCase): + + @classmethod + def setUpAll(cls): + cls.repo = Repo(GIT_REPO) @raises(InvalidGitRepositoryError) def test_new_should_raise_on_invalid_repo_location(self): @@ -219,3 +221,18 @@ class TestRepo(object): # END handle files assert len(self.repo.untracked_files) == (num_recently_untracked - len(files)) + + def test_config_reader(self): + reader = self.repo.config_reader + assert reader.read_only + + def test_config_writer(self): + for config_level in self.repo.config_level: + try: + writer = self.repo.config_writer(config_level) + assert not writer.read_only + except IOError: + # its okay not to get a writer for some configuration files if we + # have no permissions + pass + # END for each config level |