2012-08-10 47 views

回答

2

您可以运行nosetests与选项-i--include

-i REGEX, --include=REGEX 
         This regular expression will be applied to files, 
         directories, function names, and class names for a 
         chance to include additional tests that do not match 
         TESTMATCH. Specify this option multiple times to add 
         more regular expressions [NOSE_INCLUDE] 
+0

我们可以添加一个插件还是什么?许多人使用相同的代码,所以我想要一个解决方案,以便我们只需要从命令行运行“nosetests”。当然,我可以要求每个人都添加别名,但我希望是否有更好的解决方案。 – Rajat 2012-08-10 20:23:33

+0

是的,你可以使用[code](https://github.com/nose-devs/nose/blob/master/nose/plugins/allmodules.py)其中一个[bundled modules](http://以nose.readthedocs.org/en/latest/plugins/allmodules.html)为例。 – 2012-08-10 20:26:51

相关问题