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
Post a Comment