redding/dat-worker-pool — pull request #16 by jcredding (2014-12-30 20:33:53+00:00)
Title: Update `WorkerPoolSpy`, spy init args and call queue callbacks

This updates the `WorkerPoolSpy`. Firstly, it updates it's
constructor method to match `DatWorkerPool`. This allows it to
spy the min workers, max workers and if it was initialized in
debug mode. Secondly, it has been updated to use the queue
callbacks. This means when work is added it will automatically
call the queue push callbacks. This also adds a `pop_work` method
that will remove and return an item from the work items and
call the queue pop callbacks. This is to help in tests so other
libraries using a `WorkerPoolSpy` in their tests don't have to
know to call the callbacks manually. All of this makes it a better
spy that behaves more like a real worker pool.

@kellyredding - Ready for review.