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
Post a Comment