summaryrefslogtreecommitdiff
path: root/test/git/async/test_pool.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-08 17:25:43 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-08 17:25:43 +0200
commit13dd59ba5b3228820841682b59bad6c22476ff66 (patch)
tree7b324d19f031112c78cafea469ed10ed689c57e1 /test/git/async/test_pool.py
parent619c11787742ce00a0ee8f841cec075897873c79 (diff)
downloadgitpython-13dd59ba5b3228820841682b59bad6c22476ff66.tar.gz
task: now deletes itself once its done - for the test this doesn't change a thing as the task deletes itself too late - its time for a paradigm change, the task should be deleted with its RPoolChannel or explicitly by the user. The test needs to adapt, and shouldn't assume anything unless the RPoolChannel is gone
Diffstat (limited to 'test/git/async/test_pool.py')
-rw-r--r--test/git/async/test_pool.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/git/async/test_pool.py b/test/git/async/test_pool.py
index 0aa8f39b..3077dc32 100644
--- a/test/git/async/test_pool.py
+++ b/test/git/async/test_pool.py
@@ -26,7 +26,9 @@ class TestThreadTaskNode(InputIteratorThreadTask):
def reset(self, iterator):
self.process_count = 0
self.item_count = 0
+ self._exc = None
self._iterator = iterator
+ self._done = False
def process(self, count=1):
# must do it first, otherwise we might read and check results before
@@ -97,12 +99,13 @@ class TestThreadPool(TestBase):
print "read(0)"
items = rc.read()
assert len(items) == ni
- task._assert(1, ni).reset(make_iter())
+ task._assert(1, ni)
assert items[0] == 0 and items[-1] == ni-1
# as the task is done, it should have been removed - we have read everything
assert task.is_done()
assert p.num_tasks() == null_tasks
+ task.reset(make_iter())
# pull individual items
rc = p.add_task(task)