2012-08-10 27 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

相關問題