aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGuido Günther <g.guenther@tarent.de>2011-10-28 13:54:51 +0200
committerGuido Günther <agx@sigxcpu.org>2011-10-28 18:55:49 +0200
commit004eac7c7c6298b9f1c5e9cc1b6e6dea61433b57 (patch)
tree1af1a131a386f7049ce73c5167dbea3254280172 /tests
parent27a921eefd474dd7fed0abed8c3667aa4e1bcaa2 (diff)
GitRepository: add head property to return the current HEAD
Diffstat (limited to 'tests')
-rw-r--r--tests/test_GitRepository.py8
1 files changed, 7 insertions, 1 deletions
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
"""