summaryrefslogtreecommitdiff
path: root/test/git/test_repo.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-20 10:45:40 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-20 10:45:40 +0200
commitdd76b9e72b21d2502a51e3605e5e6ab640e5f0bd (patch)
treeaf85f25dd2f3b1947177f8f2f7cfc4b8a08e1a2d /test/git/test_repo.py
parentaa5e366889103172a9829730de1ba26d3dcbc01b (diff)
downloadgitpython-dd76b9e72b21d2502a51e3605e5e6ab640e5f0bd.tar.gz
Fixed bare repository handling - bare is now a property to prevent writing it
Diffstat (limited to 'test/git/test_repo.py')
-rw-r--r--test/git/test_repo.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/git/test_repo.py b/test/git/test_repo.py
index b91244c9..c89bcde3 100644
--- a/test/git/test_repo.py
+++ b/test/git/test_repo.py
@@ -91,6 +91,9 @@ class TestRepo(TestCase):
assert_true(git.called)
assert_true(repo.called)
+
+ def test_bare_property(self):
+ self.repo.bare
@patch_object(Repo, '__init__')
@patch_object(Git, '_call_process')
@@ -156,11 +159,11 @@ class TestRepo(TestCase):
assert_equal('<git.Repo "%s">' % path, repr(self.repo))
def test_is_dirty_with_bare_repository(self):
- self.repo.bare = True
+ self.repo._bare = True
assert_false(self.repo.is_dirty)
def test_is_dirty(self):
- self.repo.bare = False
+ self.repo._bare = False
for index in (0,1):
for working_tree in (0,1):
for untracked_files in (0,1):
@@ -168,7 +171,7 @@ class TestRepo(TestCase):
# END untracked files
# END working tree
# END index
- self.repo.bare = True
+ self.repo._bare = True
assert self.repo.is_dirty == False
@patch_object(Git, '_call_process')
@@ -236,7 +239,9 @@ class TestRepo(TestCase):
assert len(self.repo.untracked_files) == (num_recently_untracked - len(files))
def test_config_reader(self):
- reader = self.repo.config_reader
+ reader = self.repo.config_reader() # all config files
+ assert reader.read_only
+ reader = self.repo.config_reader("repository") # single config file
assert reader.read_only
def test_config_writer(self):