aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-01-10 17:01:16 +0100
committerGuido Günther <agx@sigxcpu.org>2012-01-10 20:01:03 +0100
commit2a7fe7225dfd24c0ca1a8e75dfc4ed8ee37ddc7c (patch)
tree8d460491921ba09da88c8b2bc76d61a2a1d1c6c8 /tests
parente3482c406796152ea3ab9d2c3c4afe43ca5056fd (diff)
GitRepository: Test find_tag() and add_remote_repo()
Diffstat (limited to 'tests')
-rw-r--r--tests/test_GitRepository.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py
index 684ea7bb..50b733db 100644
--- a/tests/test_GitRepository.py
+++ b/tests/test_GitRepository.py
@@ -158,7 +158,7 @@ def test_set_branch():
def test_tag():
"""
- Create a tag named I{tag}
+ Create a tag named I{tag} and check it's existance
Methods tested:
- L{gbp.git.GitRepository.create_tag}
@@ -184,10 +184,26 @@ def test_tag():
['tag', 'tag2']
"""
+def test_find_tag():
+ """
+ Find tags
+
+ Methods tested:
+ - L{gbp.git.GitRepository.find_tag}
+
+ >>> import gbp.git
+ >>> repo = gbp.git.GitRepository(repo_dir)
+ >>> repo.find_tag('HEAD')
+ 'tag2'
+ >>> repo.find_tag('HEAD', pattern='foo*')
+ Traceback (most recent call last):
+ ...
+ GitRepositoryError: Can't find tag for HEAD
+ """
def test_move_tag():
"""
- Remove tags
+ Move a tag
Methods tested:
- L{gbp.git.GitRepository.move_tag}
@@ -404,6 +420,8 @@ def test_fetch():
>>> clone.push('origin', 'master')
>>> clone.create_tag('tag3')
>>> clone.push_tag('origin', 'tag3')
+ >>> clone.add_remote_repo('foo', repo_dir)
+ >>> clone.fetch('foo')
"""
def test_create_bare():