Xv 的答案是正确的,除非您有外部文件中的测试(例如可测试规范),在这种情况下您应该添加 doctest-extension=txt 开关(用 txt 替换您的扩展名)。
Xv's answer is correct, unless you have tests that are in external files (like testable specifications) in which case you should add the doctest-extension=txt switch (substituting txt for whatever your extension is).
发布评论
评论(2)
Pydev 1.6.4 提供支持 nose 测试运行程序。
http://pydev.org/manual_adv_pyunit.html 描述如何配置鼻子测试运行器。
要运行文档测试,您需要为鼻子跑步者指定
--with-doctest
开关。Pydev 1.6.4 provides support for a nose test runner.
http://pydev.org/manual_adv_pyunit.html describes how to configure the nose test runner.
To run doc tests, you'll need to specify the
--with-doctest
switch for the nose runner.Xv 的答案是正确的,除非您有外部文件中的测试(例如可测试规范),在这种情况下您应该添加 doctest-extension=txt 开关(用 txt 替换您的扩展名)。
Xv's answer is correct, unless you have tests that are in external files (like testable specifications) in which case you should add the
doctest-extension=txt
switch (substituting txt for whatever your extension is).