Re: [nose-users] Tests from generator not running concurrently

214 views
Skip to first unread message

jason pellerin

unread,
May 6, 2013, 9:16:49 AM5/6/13
to nose-...@googlegroups.com
This is a bug in 1.3 -- there was a change to the mp plugin that had an undesired side-effect. I'd suggest sticking with 1.1 for now if you need mp+generators.

JP


On Sun, May 5, 2013 at 10:31 AM, <fooli...@googlemail.com> wrote:
Given the following:

from time import sleep

def runTest(a):
    sleep(1)
    assert a >= 0

def test_all():
    for i in range(5):
        yield (runTest, i)

I would expect the five tests to get run in parallel running with nosetests --processes=8 and thus run in approximately one second — however, it takes just over five seconds to run: they appear to be running sequentially and not concurrently.

According to the nose documentation, the multiprocess plugin has supported test generators (as the nose documentation calls them) since 1.1: I'm using nose 1.3.0 so it should be supported. Adding _multiprocess_can_split_ = True does make any difference, as one would expect, as fixtures are not used.

How do I get these five tests to run concurrently?


Thanks,

Geoffrey.

--
You received this message because you are subscribed to the Google Groups "nose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nose-users+...@googlegroups.com.
To post to this group, send email to nose-...@googlegroups.com.
Visit this group at http://groups.google.com/group/nose-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Andrey Ustyuzhanin

unread,
Mar 4, 2016, 11:13:56 AM3/4/16
to nose-users
Hi, 

Is it going to be fixed soon, or is a general advise still would be 'switch to 1.1'?

понедельник, 6 мая 2013 г., 15:16:49 UTC+2 пользователь JP написал:
Reply all
Reply to author
Forward
0 new messages