summaryrefslogtreecommitdiff
path: root/test/git/test_diff.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-11-24 11:56:55 +0100
committerSebastian Thiel <byronimo@gmail.com>2009-11-24 11:56:55 +0100
commit1194dc4322e15a816bfa7731a9487f67ba1a02aa (patch)
tree3efe6a5d68a5f594cedd3fb7218d4f12c4a212e1 /test/git/test_diff.py
parentf6c8072daa942e9850b9d7a78bd2a9851c48cd2c (diff)
downloadgitpython-1194dc4322e15a816bfa7731a9487f67ba1a02aa.tar.gz
diff: Added additional assertion to test: paths not in the index should not trigger an error
Diffstat (limited to 'test/git/test_diff.py')
-rw-r--r--test/git/test_diff.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/git/test_diff.py b/test/git/test_diff.py
index 9335aced..e559e62d 100644
--- a/test/git/test_diff.py
+++ b/test/git/test_diff.py
@@ -79,4 +79,11 @@ class TestDiff(TestBase):
for key,value in assertion_map.items():
assert value, "Did not find diff for %s" % key
# END for each iteration type
+
+ # test path not existing in the index - should be ignored
+ c = self.rorepo.head.commit
+ cp = c.parents[0]
+ diff_index = c.diff(cp, ["does/not/exist"])
+ assert len(diff_index) == 0
+