4

这是之前的一篇文章,详细介绍了 Python 的 CI 设置。提问者和回答者详细介绍了在 Hudson 中使用NoseNoseXUnit进行构建。但是,在存在init .py 的任何源文件夹上运行时, NoseXUnit会引发错误:

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

我想不出我的源文件夹也不是一个包。处理NoseXUnit时有没有我遗漏的步骤?

4

1 回答 1

5

您可能不应该使用 NoseXUnit - 它确实已经过时,并且鼻子 >= 0.11 中存在类似的功能。

从鼻子——帮助:

  --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]

如果由于某种原因您需要旧版本的鼻子,请使用http://bitbucket.org/durin42/nose-xml/ - 这是成为 --with-xunit 选项的插件。

于 2010-03-13T15:31:24.817 回答