Reputation: 76856
I have created a simple test containing two test cases:
# test.py
def test_will_pass():
pass
def test_will_fail():
assert False
In the command-line I can use nosetests test.py:test_will_fail
to just run the second test case.
The problem is that I have not found a way to create a run configuration in Eclipse PyDev that achieves the same behavior. When I create a Python unittest configuration that uses the Nose test runner, and pass test.py:test_will_fail
as argument, it will first run this test case, and then run the entire test, resulting in test_will_fail
being executed twice.
Is this a bug, or is there any way to create such a run configuration?
Upvotes: 0
Views: 1804
Reputation: 25362
Currently PyDev only supports filtering with Ctrl+F9 things inside a class (with the unittest structure).
Please create a feature request at:
https://sw-brainwy.rhcloud.com/tracker/PyDev/
Note: the work to be done in PyDev is guided through votes in the tracker and pull requests.
As a note, the pytest runner already accepts running tests with that structure inside PyDev.
Upvotes: 4