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
Simple enhancement to @ddt decorator to make it possible to provide user-friendly test method names #2
Conversation
Allows to provide user-friendly names for the user instead of the default raw data formatting.
Nice idea. Could you add a simple test case in |
Also moved the document example to be a real test case to make sure it is also tested (so it is not accidentally broken).
Here you go. By the way, are you sure about how |
"""Test the ``__name__`` attribute handling of ``data`` items with ``ddt``""" | ||
|
||
def hello(): | ||
passo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentional? I know it has no impact on the test, but funnily enough in my language (catalan) passo
colloquially means I don't care :)
Nice work. Check the typo(?) and I'll merge. About The rationale of my initial decision was that if I always unpack data, it would not be possible to write cases where you do want to get tuples fed to your test case (e.g. where you want to test a function that has tuples as parameters). |
Unintentional. Since the func wasn't really run at all, it didn't show up :-) |
Simple enhancement to @DDT decorator to make it possible to provide user-friendly test method names
Merged, sorry about the delay. Thanks! |
Thanks! When are you planning to update pypi? I have a custom sdist in our build deps I'd like to get rid of :-) |
There you are, uploaded as 0.2.0. |
Thanks! |
Basically, this allows to do something like:
Unless
__name__
is in the data, the current formatting behavior is used.