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

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -