Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to debug or run pytest scripts using eclipse?

i have installed the pytest framework.

i am able to run the testcases using the following command.

 py.test -q test_class.py

How to run the same test using eclipse?

like image 420
Lava Sangeetham Avatar asked Jun 23 '16 08:06

Lava Sangeetham


People also ask

How do I debug a Python script in eclipse?

To open the debugger, you need to open the “Debug” perspective. You can do this by selecting “Window → Open Perspective → Other…” from the main menu. In the popup window that appears, select “Debug” and click on the “OK” button.


1 Answers

From eclipse Window->Preferences --> pydev --> PyUnit --> Change the Test runner to "Py.test runner".

Right Click over the file. Run As --> Python Unit-Test

Or press Ctrl+F9:-

It will prompt you to select the test

like image 75
Deca Avatar answered Nov 14 '22 23:11

Deca