[py-dev] xdist and pytest.main

Adam Goucher adam at goucher.ca
Thu Aug 2 20:49:19 CEST 2012

I have a WebDriver framework that wraps Py.Test and after a bunch of 
setup stuff calls into things with

run_status = pytest.main(args=arguments, plugins=[marks.MarksDecorator()])

which works fine for a single execution. But now I've got a couple 
clients that /really/ want parallel execution. My thinking for this 
would be to add in the necessary arguments to pass in the way all the 
other arguments have been...

if 'n' in results.__dict__ and results.__dict__['n'] != None:
     arguments.append("--tx=%s*popen" % results.__dict__['n'])

But my scripts are not actually executing. (Which shouldnt be too too 
surprising since I likely wouldnt be writing an email if they were...)

Adam-Gouchers-MacBook:ebay adam$ pysaunter.py -m shirts -n 2
test session starts 
platform darwin -- Python 2.7.2 -- pytest-2.2.4
gw0 [0] / gw1 [0]
scheduling tests via LoadScheduling

----------------------------- generated xml file: 
in 1.21 seconds 
Adam-Gouchers-MacBook:ebay adam$

Any suggestions on how to debug why the workers are being created but 
the scripts not executed? I'd like to not write my own xdist style 
plugin so would like to make things behave with the existing one.


More information about the Pytest-dev mailing list