I am running tests from a script with Nose. I want to be able to specify the xunit xml output file. The documentation says I can do it with the --xunit-file=FILE option.
I have
noseargs = ['--with-xunit', '--xunit-file=output.xml', '--tests=mytest']
nose.run(argv=noseargs)
After running this, the output.xml file isn't there. I've found if I swap the two arguments so it looks like:
noseargs = ['--xunit-file=output.xml', '--with-xunit', '--tests=mytest']
nose.run(argv=noseargs)
it will create a nosetests.xml file in my working directory. So it looks like the --with-xunit argument needs to be processed first, then the file needs to be specified. Is there something particular about how the file should be specified that I'm missing?