Is there a way to integrate background unit tests with the Pydev Eclipse environment?
My unit tests run well, but I would like to integrate them to run in the background based on source file changes (e.g. with nose) and to integrate the result back to Eclipse (I'm thinking big red X when tests fail with a console and trace log view).
No, a command prompt running nose on the side does not count.
I have had this Eclipse integration when developing RoR stuff.
Thanks,
Tal.
EDIT: Check out the new Pydev (1.6.4) http://pydev.org/manual_adv_pyunit.html
What is PyDev? PyDev is a Python IDE for Eclipse, which may be used in Python, Jython and IronPython development. It comes with many goodies such as: Django integration.
Create a new projectGo to File → New → PyDev Project to start a wizard. In the next window that appears, enter the name of your project and select "python" and 3.0"; as the type. Make sure "create default 'src' folder and add it to the pythonpath?" is selected. Click Finish.
Go to the menu: Alt + R + S + The number of the Run you wish (It can be Python, Jython, unit-test, etc). Note: if you were using unit-tests, you could use: Ctrl+F9 to run the unit-tests from the module (and even selecting which tests should be run -- and if Shift is pressed it's launched in debug mode).
This feature has been added to PyDev 2.0.1 with an option to relaunch the tests in the last test run whenever a python file change, with an additional option to rerun only the errors -- although it'll run the full test suite if no errors were found, as the idea is that you work through your errors and when all pass a final launch for the whole suite is done (then you can move on to another task).
The current nightly build has this feature incorporated.
Pydev does have some unit-test integration, but that's only as a run configuration...so...
This is not a very elegant way, but if you:
Then at least you will get something that outputs the test results to the console on resource saves.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With