[py-dev] xdist and pytest.main

holger krekel holger at merlinux.eu
Thu Aug 2 22:12:48 CEST 2012


Hi Adam,

On Thu, Aug 02, 2012 at 14:49 -0400, Adam Goucher wrote:
> 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("--dist=load")
>      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: 
> /Users/adam/work/saunter/py.saunter-examples/ebay/logs/2012-08-02-14-21-46.xml 
> -----------------------------
> ====================================================================== 
> 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.

Hum, this looks like no tests are collected at all.  If you leave
away the "-n" option, tests do run?  Can you show the -v output of
that?  I assume you are running things in the correct directory 
and have no change-directory code in your tests/plugin?

best,
holger



> -adam
> 
> 
> _______________________________________________
> py-dev mailing list
> py-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/py-dev
> 



More information about the Pytest-dev mailing list