From 1eae9d1532e037a4eb08aaee79ff3233d2737f31 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 3 Dec 2009 15:52:22 +0100 Subject: 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 --- test/git/test_repo.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/git/test_repo.py') 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 -- cgit v1.2.1