Using Nose & NoseXUnit on a Python package

只愿长相守 提交于 2019-12-12 11:25:29

问题


This is a previous post detailing a CI setup for Python. The asker and answerer detail the use of Nose and NoseXUnit with Hudson for their builds. However, NoseXUnit throws an error when run on any source folder where init.py is present:

File "build/bdist.linux-x86_64/egg/nosexunit/tools.py", line 59, 
    in packages nosexunit.excepts.ToolError: following folder can not contain 
    __init__.py file: /home/dev/source/web2py/applications

I can't think of a source folder of mine that is not a package also. Is there a step I am missing when dealing with NoseXUnit?


回答1:


You probably shouldn't use NoseXUnit - it's really out of date, and a similar feature exists in nose >= 0.11.

From nose --help:

  --with-xunit          Enable plugin Xunit: This plugin provides test results
                        in the standard XUnit XML format. [NOSE_WITH_XUNIT]
  --xunit-file=FILE     Path to xml file to store the xunit report in. Default
                        is nosetests.xml in the working directory
                        [NOSE_XUNIT_FILE]

if for some reason you need an old version of nose, use http://bitbucket.org/durin42/nose-xml/ - that's the plugin that became the --with-xunit option.



来源:https://stackoverflow.com/questions/2083102/using-nose-nosexunit-on-a-python-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!