2010-01-31 45 views

回答

8

何不:

  • 限定在ant腳本一套測試,或者目標(如this one,在文章的底部), - 然後啓動配置相關聯(外部一個爲螞蟻腳本)?

然後,您可以使用shortcut to that launch configuration(如this thread)。對於
一種解決方案是always launch the last applicationF11Ctrl鍵 + F11

<target name="tests" depends="compile"> 
    <py-test pythonpath="${src.dir}" dir="."> 
    <fileset dir="${src.dir}"> 
     <include name="**/*Test.py"/> 
    </fileset> 
    </py-test> 
</target> 

注意:還有其他的方法來整合與PyDev的單元測試中,如圖SO質疑Continuous unit testing with Pydev (Python and Eclipse)

1

轉到首選項並鍵入鍵以進入鍵盤快捷鍵定義頁面(我認爲它被稱爲鍵...對不起,現在我的開發機器上)。在這個對話框中你可以搜索命令。查看是否有運行所有測試命令(它可能有助於查找您當前正在使用的運行測試)。如果有檢查快捷方式或定義你自己的。

+0

的Python單元測試不會出現在關鍵的配置菜單 – 2010-02-14 21:18:42

4

單擊pydev包資源管理器中包含測試的文件夾。然後運行菜單選項(這是不是F9但對我來說CMD + 轉變 + F11(OK,我在OSX,但我懷疑這會是CTRL + 轉變 + F11其他地方)這運行所有它可以在子目錄中找到測試

要重複你需要做的按VonC的答案

然後,您可以使用shortcut to that launch configuration(如this thread)。對於
一種解決方案是always launch the last applicationF11Ctrl鍵 + F11