python - How to specify xml output for nose programatically -



python - How to specify xml output for nose programatically -

i running tests script nose. want able specify xunit xml output file. documentation says can --xunit-file=file option.

i have

noseargs = ['--with-xunit', '--xunit-file=output.xml', '--tests=mytest'] nose.run(argv=noseargs)

after running this, output.xml file isn't there. i've found if swap 2 arguments looks like:

noseargs = ['--xunit-file=output.xml', '--with-xunit', '--tests=mytest'] nose.run(argv=noseargs)

it create nosetests.xml file in working directory. looks --with-xunit argument needs processed first, file needs specified. there particular how file should specified i'm missing?

nose eats first argument of argv because on commandline it's name of program.

this works with:

noseargs = ['foo', '--with-xunit', '--xunit-file=output.xml', '--tests=mytest'] nose.run(argv=noseargs)

python nose

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -