From 615de50240aa34ec9439f81de8736fd3279d476d Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 30 Nov 2009 14:42:17 +0100 Subject: index: Added BlobFilter utility class to make filtering of blobs from the index easier --- test/git/test_index.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/git/test_index.py') 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) -- cgit v1.2.1