[TIP] Using pytest-xdist --looponfail with Jython 2.7

holger krekel holger at merlinux.eu
Thu Jan 8 05:47:08 PST 2015


Hi Chris,

On Mon, Dec 01, 2014 at 20:09 -0800, Chris Rose wrote:
> My package's Jython launcher is not trivial -- it sets up some environment
> variables, some system properties, and then runs the Jython 2.7 jar, like
> so:
> 
> PYTHONPATH=... ENV_VAR=... $BIN/java -Dsomestuff $LIB/jython.jar -c "import
> _pytest.config; _pytest.config.main()"
> 
> When I try use xdist, though, the xdist gateway tries to start the Jython
> process for the remote by executing just $LIB/jython.jar, which does not
> work. Is there any way I can control the xdist plugin's executable for the
> gateway process?

Take a look at the "xspec" syntax which you can use with the ``--tx`` option
of pytest-xdist:

http://codespeak.net/execnet/basics.html#examples-for-valid-gateway-specifications

not sure, though, that jython still works with the execnet mechanisms, though.

best,
holger



More information about the testing-in-python mailing list