diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-11-30 14:42:17 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-11-30 14:42:17 +0100 |
commit | 615de50240aa34ec9439f81de8736fd3279d476d (patch) | |
tree | e8bb36eccc7a5eb82a770881e065f5529aefbdba /test/git/test_index.py | |
parent | f22ddca351c45edab9f71359765e34ae16205fa1 (diff) | |
download | gitpython-615de50240aa34ec9439f81de8736fd3279d476d.tar.gz |
index: Added BlobFilter utility class to make filtering of blobs from the index easier
Diffstat (limited to 'test/git/test_index.py')
-rw-r--r-- | test/git/test_index.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/git/test_index.py b/test/git/test_index.py index e96aff4c..3a7edc7e 100644 --- a/test/git/test_index.py +++ b/test/git/test_index.py @@ -121,6 +121,11 @@ class TestTree(TestBase): assert merge_blobs[0][0] in (1,2,3) assert isinstance(merge_blobs[0][1], Blob) + # test BlobFilter + prefix = 'lib/git' + for stage, blob in base_index.iter_blobs(BlobFilter([prefix])): + assert blob.path.startswith(prefix) + # writing a tree should fail with an unmerged index self.failUnlessRaises(GitCommandError, three_way_index.write_tree) |