summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_GitRepository.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py
index 1b3f5b8..5b9fc92 100644
--- a/tests/test_GitRepository.py
+++ b/tests/test_GitRepository.py
@@ -410,6 +410,23 @@ def test_get_commit_info():
defaultdict(<type 'list'>, {'M': ['testfile']})
"""
+def test_diff():
+ """
+ Test git-diff
+
+ Methods tested:
+ - L{gbp.git.GitRepository.diff}
+
+ >>> import gbp.git
+ >>> repo = gbp.git.GitRepository(repo_dir)
+ >>> len(repo.diff('HEAD~1', 'HEAD')) > 3
+ True
+ >>> len(repo.diff('HEAD~1', 'HEAD', 'testfile')) > 3
+ True
+ >>> len(repo.diff('HEAD~1', 'HEAD', 'filenotexist')) == 0
+ True
+ """
+
def test_mirror_clone():
"""
Mirror a repository