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

A Feature to Name Test Cases #28

Open
Jmdwow opened this issue Mar 5, 2020 · 2 comments · May be fixed by #30
Open

A Feature to Name Test Cases #28

Jmdwow opened this issue Mar 5, 2020 · 2 comments · May be fixed by #30
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Jmdwow
Copy link
Contributor

Jmdwow commented Mar 5, 2020

Is your feature request related to a problem? Please describe.
The names of each test case in grade's output is just the class name, function name, and function docstring, instead of being user-defined.

Describe the solution you'd like
Potentially a name decorator that will override the default name if one exists for a test function.

Describe alternatives you've considered
The docstring for each test function could also be used by itself, but this wouldn't allow more descriptive test docstrings, forcing them to be solely names.

@Jmdwow Jmdwow added the enhancement New feature or request label Mar 5, 2020
@Jmdwow Jmdwow linked a pull request Mar 5, 2020 that will close this issue
@thoward27
Copy link
Owner

Definitely don't like docstring idea, a name decorator seems perfect. Only thing to consider is if this gets added, there also needs to be a way to assign it in the function (self.name = "test"). In reality, the tooling for this should be the same as all of the other attributes we set.

@thoward27 thoward27 added the good first issue Good for newcomers label Mar 5, 2020
@Jmdwow
Copy link
Contributor Author

Jmdwow commented Mar 5, 2020

The linked PR implements the decorators and in-function assignment in the same way it works with others (ex. visibility and weight) currently. I also didn't care for docstrings as an idea, but figured I would mention it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants