dgrandes
dgrandes

Reputation: 1207

Python nose - running multiprocess programmatically

I can't run nose with several processes programmatically.

This works...:

PYTHONPATH="/home/developer/Downloads/unittest2-0.5.1:" nosetests --processes=4 

It spawns 4 browsers at once.

When running this in eclipse however, it runs them one by one.

nose.run(defaultTest="",argv=['--processes=4','--verbose', '--process-timeout=30'])

I know the arguments are kicking in because I can see a difference with the verbose argument.

Upvotes: 3

Views: 2068

Answers (1)

dgrandes
dgrandes

Reputation: 1207

The answer was a bit tricky!

For some reason, nose.run ignores the first argument it receives.

This actually works:

nose.run(defaultTest="",argv=['','--processes=4','--verbose', '--process-timeout=90'])

This answers the question's dilemma perfectly: "I know the arguments are kicking in because I can see a difference with the verbose argument." :)

Upvotes: 7

Related Questions