I know Ctrl + F9 runs a single file.
How to run them all?
If there is no such thing, how to bind one keyboard shortcut to it?
Press Alt+Shift+X,T to run the test (or right-click, Run As > JUnit Test).
In the Package Explorer area on the left side of the Eclipse window, right-click the class you want to test and click New → JUnit Test Case. A dialog box will pop up to help you create your test case. Make sure that the option at the top is set to use JUnit 4, not JUnit 3.
The command to run the tests is python -m unittest filename.py . In our case, the command to run the tests is python -m unittest test_utils.py .
Why not:
You could then use a shortcut to that launch configuration (as in this thread).
One solution for that is to always launch the last application (F11 or Ctrl+F11 )
<target name="tests" depends="compile">
<py-test pythonpath="${src.dir}" dir=".">
<fileset dir="${src.dir}">
<include name="**/*Test.py"/>
</fileset>
</py-test>
</target>
Note: there are other ways to integrate unit testing with pydev, as shown in SO question Continuous unit testing with Pydev (Python and Eclipse)
Click on a folder that contains tests in the pydev package explorer. Then the run menu option (which is not f9 for me but cmd+shift+F11 (OK I am on OSX but I suspect this would be ctrl+shift+f11 elsewhere) This runs all the tests it can find in subdirectories
To repeat you need to do as per VonC's answer
You could then use a shortcut to that launch configuration (as in this thread).
One solution for that is to always launch the last application (F11 or Ctrl+F11 )
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