Skip to content

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

Closed

Description

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

Activity

  1. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Jun 9, 2020
  2. karthiknadig commented on Jun 9, 2020

    @karthiknadig
    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.

  3. luabud commented on Jul 8, 2020

    @luabud
    Member

    Related: #11864

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

  4. luabud commented on Jul 29, 2021

    @luabud
    Member

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

    image

  5. locked as resolved and limited conversation to collaborators on Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions