Python Nose tests from generator not running concurrently -


given following:

from time import sleep  def runtest(a):     sleep(1)     assert >= 0  def test_all():     in range(5):         yield (runtest, i) 

i expect 5 tests run in parallel running nosetests --processes=8 , run in approximately 1 second — however, takes on 5 seconds run: appear running sequentially , not concurrently.

according nose documentation, multiprocess plugin has supported test generators (as nose documentation calls them) since 1.1: i'm using nose 1.3.0 should supported. adding _multiprocess_can_split_ = true make difference, 1 expect, fixtures not used.

how these 5 tests run concurrently?

according nose's author, on mailing list, multiprocess plugin not work generators in 1.3 (a known bug), , recommends sticking 1.1 if 1 needs work.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -