-
Notifications
You must be signed in to change notification settings - Fork 13
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
Use user-defined test name in report #47
Conversation
* Shows the user-defined "Name" in reports * Name is specified with eunit format (tuple "Name" ...<test>...) * Works with fixtures and deftestcase * This is better than simply repeating the fixture function name for every test * Does not work for plain deftest because of an eunit bug which does not send the name to the listener for plain tests
'true | ||
'false)) | ||
((t) (when (is_list t)) | ||
(if (andalso (== 'tuple (hd t)) |
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.
Please remove the unnecessary parent if
form.
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.
@yurrriq do you mean the printable_list(...) test? It is needed to differentiante from tuples like
{spawn, Tests} or {timeout, Tests} etc.
|
You can think of a |
LGTM /cc @oubiwann |
This looks very cool -- thanks for working on this feature! I have some thoughts/requests for clarification:
If this change set keeps the old behaviour too, could you address point 2? Looking forward to merging this! |
It is not an additional feature really, it simply honors the eunit behaviour which was being ignored before whenever you had (tuple "Title" Tests}.... to summarize:
I can keep the old tests and add new ones for the patch. What do you think? |
👍 for keeping the old tests and adding new ones. I think point 1 is already addressed. |
@erlanger Fantastic -- thanks for sharing more details. +1 for the test updates -- that should do it (ah, as I typed this, it seems that a new change is being processed by Travis, so you may have just done that ...) |
hehe, I was pushing the code as you were typing :) |
You may have already noted this and be debugging it, but it seems that the fixtures tests ( You might not have seen this since there is currently some missing error/state checking in ltest ... but running Incidentally, I think I've got a ticket open for this somewhere ... I'll look it up. Update: Well, I couldn't find the old ticket (maybe it never got created?) so I created a new one: #49. |
Just posted a fix, it was a missing comma when I restored the old tests. |
Sweet, thanks! |
Use user-defined test name in report
for every test
does not send the name to the listener for plain tests