pydev nosetests test run

2019-04-09 22:30发布

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

2条回答
forever°为你锁心
2楼-- · 2019-04-09 22:38

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
查看更多
ゆ 、 Hurt°
3楼-- · 2019-04-09 22:59

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).

查看更多
登录 后发表回答