summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2012-09-14 13:40:14 +0300
committerGuido Günther <agx@sigxcpu.org>2014-12-05 15:35:14 +0100
commitcb9271fe113bae56088c9c1d07870c408a518a52 (patch)
treec8b53e9859e7ea9cc412b171a4f1d04b01b2e812 /tests
parent7a503e926669041847f568d1ee26ff948e261ffd (diff)
GitRepository: add diff_status method
This is a method of getting the filename and status information of a diff. That is, a list of files that changed and their status, "added", "modified" etc. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_GitRepository.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py
index 427370d..c5c5849 100644
--- a/tests/test_GitRepository.py
+++ b/tests/test_GitRepository.py
@@ -493,6 +493,19 @@ def test_diff():
True
"""
+def test_diff_status():
+ """
+ Methods tested:
+ - L{gbp.git.GitRepository.diff_status}
+
+ >>> import gbp.git
+ >>> repo = gbp.git.GitRepository(repo_dir)
+ >>> repo.diff_status("HEAD", "HEAD")
+ defaultdict(<type 'list'>, {})
+ >>> repo.diff_status("HEAD~1", "HEAD")
+ defaultdict(<type 'list'>, {'M': ['testfile']})
+ """
+
def test_mirror_clone():
"""
Mirror a repository