Search code examples
pythoneclipsepydevpytestliclipse

How can i run a specific parametric test-case in py.test in Eclipse


While PyDev supports py.test runner, when running parametric-tests, it is not possible to run a specific test-case in PyUnit view.

Normally, Right-click+Run on a test-case in PyUnit view re-launches it - but in this case, nothing happens, and the console logs:

============================= test session starts =============================
platform win32 -- Python 3.6.1, pytest-3.2.1, py-1.4.33, pluggy-0.4.0
rootdir: D:\project, inifile:
collected 23 items

======================== no tests ran in 0.04 seconds =========================

(note that i tried that on Windows only)


Solution

  • There's no support for running a single parametric failed test case in PyDev (and can't really think of a way to make this work either).

    So, you have to run the test which will run it with all the parametric arguments passed (i.e.: use Ctrl+Shift+Up / Ctrl+Shift+Down to select the test in the editor and then use Ctrl+F9 to run only that test).