From 004eac7c7c6298b9f1c5e9cc1b6e6dea61433b57 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Fri, 28 Oct 2011 13:54:51 +0200 Subject: GitRepository: add head property to return the current HEAD --- tests/test_GitRepository.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py index 1aa98a19..34b96604 100644 --- a/tests/test_GitRepository.py +++ b/tests/test_GitRepository.py @@ -22,7 +22,7 @@ def test_create(): Methods tested: - L{gbp.git.GitRepository.create} - Propeties tested: + Properties tested: - L{gbp.git.GitRepository.path} - L{gbp.git.GitRepository.git_dir} @@ -63,6 +63,9 @@ def test_add_files(): - L{gbp.git.GitRepository.commit_all} - L{gbp.git.GitRepository.is_clean} + Properties tested: + - L{gbp.git.GitRepository.head} + >>> import gbp.git, shutil >>> repo = gbp.git.GitRepository(repo_dir) >>> shutil.copy(os.path.join(repo.path, ".git/HEAD"), \ @@ -73,6 +76,9 @@ def test_add_files(): >>> repo.commit_all(msg="foo") >>> repo.is_clean()[0] True + >>> h = repo.head + >>> len(h) + 40 """ -- cgit v1.2.3