Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shortcut to run the current test (at cursor position) #12218

Closed
simgunz opened this issue Jun 9, 2020 · 3 comments · Fixed by #16769
Closed

Add shortcut to run the current test (at cursor position) #12218

simgunz opened this issue Jun 9, 2020 · 3 comments · Fixed by #16769
Assignees
Labels
area-testing feature-request Request for new features or functionality needs proposal Need to make some design decisions verified Verification succeeded
Milestone

Comments

@simgunz
Copy link

simgunz commented Jun 9, 2020

While writing a new test, the test has to be run multiple times so it would be nice to have a shortcut to run the test we are working on (the one at the position of the cursor).

An alternative is a shortcut to run the last run test.

The extension Test Explorer has this option, but given that the native python extension already provides many shortcuts to run tests, it does not make sense to install another extension just for this feature.

See also:
https://stackoverflow.com/questions/43342733/shortcut-to-run-current-python-unit-test-in-vscode

@simgunz simgunz added triage-needed Needs assignment to the proper sub-team feature-request Request for new features or functionality labels Jun 9, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Jun 9, 2020
@karthiknadig
Copy link
Member

Thank you for the suggestion! We have marked this issue as "needs decision" to make sure we have a conversation about your idea. We plan to leave this feature request open for at least a month to see how many 👍 votes the opening comment gets to help us make our decision.

@luabud
Copy link
Member

luabud commented Jul 8, 2020

Related: #11864

We can add a shortcut to execute the "Run test" code lens containing block.

@luabud luabud added area-testing needs proposal Need to make some design decisions and removed needs decision labels Jul 8, 2020
@luabud luabud self-assigned this Aug 12, 2020
@luabud luabud added the verified Verification succeeded label Jul 29, 2021
@luabud
Copy link
Member

luabud commented Jul 29, 2021

This is addressed by #16769. It introduces a "Test: Rerun Last Run" command, which can be bind to a keyboard shortcut 😊

image

@karthiknadig karthiknadig added this to the August 2021 milestone Aug 5, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-testing feature-request Request for new features or functionality needs proposal Need to make some design decisions verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants