pydev nosetests test run

房东的猫 提交于 2019-12-06 05:35:31

问题


Seems like a silly question but I've been unable to figure it out...

I'd like to use eclipse/pyunit to run all my tests. I've configured the test runner to be the nose test runner.

Now I'd like for pyunit to use nose


回答1:


You can right-click a folder/file and choose Run as > Python unittest or if you have the file open in an editor, you can use 'Ctrl+F9' to run the tests (and even filter to select the test(s) you want to run).


Note: for this to work with nose you have to select the nose test runner in the preferences (window > preferences > pydev > pyunit) -- and the same is true if you're using the py.test runner (but note that if you're using regular unittest tests, the default runner should work fine).




回答2:


I found this solution:

  1. On the main menu, go to Windows->Preference->PyDev->PyUnit
  2. Under "test runner" choose Nose test runner.
  3. Apply
  4. Ok


来源:https://stackoverflow.com/questions/8191146/pydev-nosetests-test-run

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!