summaryrefslogtreecommitdiff
path: root/test/git/test_repo.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-12-03 15:52:22 +0100
committerSebastian Thiel <byronimo@gmail.com>2009-12-03 15:52:22 +0100
commit1eae9d1532e037a4eb08aaee79ff3233d2737f31 (patch)
treed3461b9fb163bf96f7fe9ab45c9de1d6a6ddfe0f /test/git/test_repo.py
parentbae67b87039b3364bdc22b8ef0b75dd18261814c (diff)
downloadgitpython-1eae9d1532e037a4eb08aaee79ff3233d2737f31.tar.gz
repo: fixed incorrect path handling thta could lead to issues if the repository was initialized with a .git repository, although it was not bare actually
Diffstat (limited to 'test/git/test_repo.py')
-rw-r--r--test/git/test_repo.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/git/test_repo.py b/test/git/test_repo.py
index 93ab7a90..e94a45bd 100644
--- a/test/git/test_repo.py
+++ b/test/git/test_repo.py
@@ -20,6 +20,13 @@ class TestRepo(TestBase):
def test_new_should_raise_on_non_existant_path(self):
Repo("repos/foobar")
+ def test_repo_creation_from_different_paths(self):
+ r_from_gitdir = Repo(self.rorepo.path)
+ assert r_from_gitdir.path == self.rorepo.path
+ assert r_from_gitdir.path.endswith('.git')
+ assert not self.rorepo.git.git_dir.endswith('.git')
+ assert r_from_gitdir.git.git_dir == self.rorepo.git.git_dir
+
def test_description(self):
txt = "Test repository"
self.rorepo.description = txt