Shortcut to run the current Python unit test in VSCode

The question is about Visual Studio Code (VSCode from here) and the python VSCode extension that finds and runs py.test tests.

Is it possible to assign some shortcut to run the current (under the cursor) test method and / or test class?

I really like the ability to run a single test directly from VSCode, but my workflow is not optimal, because I need to click on it and just use the shortcut.

clickable run test

Buttons that appear when tests are found and can be run are displayed on this image. I would like to know if it's just possible to use some kind of custom shortcut instead of clicking on these buttons.

+4
2

, , runner. ,

Ctrl + Shif + X

enter image description here

.

- .

, , .

:

Ctrl + Alt + N

0

"" > "" > " "

python

Python .

enter image description here , , "+". .

enter image description here

0
source

Source: https://habr.com/ru/post/1674562/


All Articles