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

Enhancement: Create test stubs #22

Open
pykong opened this issue May 20, 2019 · 1 comment
Open

Enhancement: Create test stubs #22

pykong opened this issue May 20, 2019 · 1 comment

Comments

@pykong
Copy link
Contributor

pykong commented May 20, 2019

I believe a great enhancement for this package would be a command to create test stubs.
Such would parallel a function many IDEs, like Visual Studio, provide to make the life of the lazy programmer more comfortable.

app.py

def add(a: int, b: int) -> int:
    return a + b

Will create this test file under the respective path with some test stub already in it:

/tests/test_app.py

import pytest

from ..app import add

def test_add(self):
    """Test for add."""
    raise NotImplementedError("Test for add not implemented.")
@kaste
Copy link
Owner

kaste commented May 21, 2019

There is no 1-to-1 relationship between app code and testing code. There is also no established convention how we should organize tests in the python community.

Again, you need a very good idea to get this rolling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants