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

Generate method #2089

Open
enginpost opened this issue May 22, 2020 · 1 comment
Open

Generate method #2089

enginpost opened this issue May 22, 2020 · 1 comment

Comments

@enginpost
Copy link

@enginpost enginpost commented May 22, 2020

It would be nice, for Test-Driven Development, if we could right-click on a method name in a test, for a method that does not yet exist, and generate a new method for the referenced class via the context menu.

Generate-Method

In TDD you write a test, and immediately run it and it fails. And then you make the changes to support the test passing, and then run the test again. Then the test passes. It would be nice to be able to write the test, including a reference to the undefined method, right-click on the method reference in the test to generate it in the associated instance's class (assuming loading the menu could check for a definition and if not, enable that menu option while disabling the "Go to Definition" and "Go to Reference" options). Clicking it could generate a basic method that would at least fail a test, but include the essential arguments noted in the reference to the undefined method.

I suppose this could be an additional extension, but it feels like it would be nice to have this directly in vscode-python.

@karthiknadig
Copy link
Member

@karthiknadig karthiknadig commented May 22, 2020

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 luabud transferred this issue from microsoft/vscode-python Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.