summaryrefslogtreecommitdiff
path: root/test/git/test_repo.py
diff options
context:
space:
mode:
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