Thank's for a great product that I have high hopes on to make me more productive... now to my question.
What's the simplest way to get PyDev (or Eclipse in general) to Run a file whenever I save it?
That way all unit tests belonging to the module will be run, by using the __name__ == '__main__' idiom, and I won't be able to save without having any errors or failures will nagging me to fix them. (I usually set the TestRunner to make it rewardingly quiet when everything passes once in while.)
On the same topic: Are there already some Eclipse plugin that can parse the output of unittest and populate the Problems view with it?
> (I usually set the TestRunner to make it rewardingly quiet when everything passes once in while.)
Gha! Should be:
(I usually set the TestRunner to silent to make it rewardingly quiet when everything passes once in while.)
> What's the simplest way to get PyDev (or Eclipse in general) to Run a file whenever I save it?
Come to think about it. Having an option to automatically invoke the PyDev test runner on the whole project when saving may be a more preferable behavior for continuous testing... I can always keep on running test for single modules by hitting F9 as always.
I guess the continuous thing can be implemented with Jython-scripting of PyDev? Unless there is an even simpler, more general, way to do it.
Ok, so I've started implementing this as a Jython-script for PyDev and building my own custom test runner. Guess I should join pydev-code now. :-)
You can set a program to be run whenever you change a file as a builder (in the project properties). The script used in pydev to run the tests is: eclipse/plugins/org.python.pydev.debug_xxx/pysrc/runfiles.py
Another option would be using nose with nosey... http://somethingaboutorange.com/mrl/projects/nose/ and nosey (there's a screencast about it at: http://showmedo.com/videos/video?name=UsingNoseyForPythonTesting_jeffW&fromSeriesID=7\).