[TIP] py.test plugins specified with -h are not loaded with xdist

holger krekel holger at merlinux.eu
Fri Mar 18 15:35:23 PDT 2011


the issue is fixed with pytest-2.0.3.dev3 soon to be released.
Keep the bug reports coming :)

best,
holger

On Tue, Mar 15, 2011 at 16:06 -0400, Yoann Roman wrote:
> On Tue, Mar 15, 2011 at 3:51 PM, holger krekel wrote:
> >
> > On Tue, Mar 15, 2011 at 15:42 -0400, Yoann Roman wrote:
> > > I have a custom py.test plugin in a package. When I load it with
> > > py.test -h package.plugin, it loads fine. When I use py.test -h
> > > package.plugin -n 4, the main session loads it, but the plugin isn't
> > > loaded by the separate 4 processes running the tests.
> >
> > Hum, never tried to run the help option distributedly :)
> 
> I like my nodes well-informed :-).
> 
> > Or do you rather mean "py.test -p package.plugin"?
> >
> > If so then it would be a bug if it doesn't work.  It'd
> > be nice if you include a trace / example trace to the issue
> > https://bitbucket.org/hpk42/pytest/issue/34
> 
> I did mean -p. I don't actually get a traceback from py.test, just
> from my tests. When they start running, the environment that my plugin
> would have set up is missing. If I specify the plugin with a
> conftest.py file or use -p without multiprocessing, everything works.
> 
> I'll try to create a smaller environment to reproduce this.
> 
> > > Is that expected behavior? Is using a conftest.py file the only way to
> > > get a project-specific plugin loaded?
> >
> > it's kind of the default way.  But in principle you should be able
> > to also specify a module with "-p" and to also add it to
> > the "addopts" option in the .ini file.
> 
> That's what I thought, but it's not working.
> 
> -- 
> Yoann Roman
> 
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python



More information about the testing-in-python mailing list