0

In the PyUnit view in Pydev...

Suppose the view currently shows 5 tests, 1 of which fails.

When I right click on the failed test, and then run it (with either Run or Debug), all the other tests disappear from the view. How do I stop it from removing all the other tests?

Next question.....

Also, Pydev then creates a run configuration for the test that I just ran. Which means that if I right click on the test module in the PyDev Package Explorer, and then try to "Run As" "Python Unit Test", I then have to select which run configuration. How do I stop it creating a new run configuration?

2 Answers 2

1

When you right-click a failed test and run it, you did a new run configuration that just ran it alone (so, you get the results just showing that one).

What is implemented is that you have a 'pin' icon in the pyunit view. You can click it to 'bookmark' the run, so, when you press the 'reload', which is the icon in the right of the pin, it'll reload those results (or you can manually choose the results from any run from the test run history dropdown).

As for running, there's no way to stop it from creating a new run configuration, but what you can do is just re-run the last one with Ctrl+F11 (provided you configured it properly as explained in http://pydev.org/manual_101_run.html).

You can also access old runs with Alt+R, T > number from 1 to 9 an old configuration you want to run.

2
  • Thanks. I also watched a video, and have been using CTRL+9 to open up a test menu. But what I'd like is a set of green/red/orange lights next to each test, and to be able to click those to run tests.
    – Ginger
    Feb 13, 2014 at 21:47
  • Well, it almost gives you that (i.e.: bookmark it, do a new run and press the reload to get back to it). Although it could be nice bookmarking it to a different place so that you don't 'loose' it (but that's a different feature which is not currently implemented). Feb 13, 2014 at 22:50
0

Even though it is possibly not the exact approach you may expect, one option is to start the Unittest from the command line and attach the debugger by RemoteDebugServer via 'pydevd.py'.

This is now a fully automated option of ePyUnit which includes the automation of remote debugging with PyDev and Eclipse by 'pydevd.py'. This works seamlessly for the 'subprocess' call as well as independently started command line processes.

See:

For basics of remote debugging:

Also enhanced unittest integration into PyUnit.

Comments and fixes are welcome.

Have fun..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.