-
Notifications
You must be signed in to change notification settings - Fork 30
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
#99 feat: Include argument 'comment' in assertions #211
base: master
Are you sure you want to change the base?
Conversation
Included help text for argument 'comment' in assertion functions.
I suggest to include the argument 'comment' in assertion-functions. The suggestion appends the comment after the standard message and may be considered as a solution of issue mllg#99. The original wish was to place the comment before the standard message. I have put the argument 'comment' before the argument 'add'. This may be a breaking change if users of the assertion functions has listed the arguments without the argument name, i.e has not used "... , add = collection", but just written (... , collection).
Inclusion of the argument 'comment' in assert to make it in agrement with including the argument 'comment' in other assertion functions. In the case of 'combine = "or"', the comment is placed on a new line. In the case of 'combine = "add"', the comment is appended each assertion that fails and is on the same line. If there are more than one assertion that fails, this is not optimal.
I had a look at the failed test for Windows. The test failed due to too many arguments for a function which I believe is OK as I have added an argument. |
Thanks for the PR. I'll first try to release a new version of checkmate in 2-3 weeks, then review and merge this one. |
Hi
I'm glad that you will try to make a new release soon, I'm very interested in some of the new features in 2.1. Thank you for considering the PR and no problems with prioritizing the new release first.
Kind regards,
Petter Hopp
***@***.***
Fra: Michel Lang ***@***.***>
Sendt: fredag 24. september 2021 10:52
Til: mllg/checkmate ***@***.***>
Kopi: Hopp, Petter ***@***.***>; Author ***@***.***>
Emne: Re: [mllg/checkmate] #99 feat: Include argument 'comment' in assertions (#211)
Thanks for the PR. I'll first try to release a new version of checkmate in 2-3 weeks, then review and merge this one.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#211 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AC7JXNTM5DZG6B6RLHQ2B6TUDQ3ZHANCNFSM5C3CVEGQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi. Is this PR going to be merged? |
@PetterHopp I would also love to see this capability too! For a while in my work, I define dynamic wrappers ( @mllg would you consider merging the PR? Some comments/suggestions:
Thanks! 🙏 |
@renozao Thank you for supporting the possibility of adding a comment in assertion functions. |
@PetterHopp @mllg I would rather use
One could then customize how the error message is structured, e.g.:
|
I suggest to include the argument 'comment' in assertion functions.
This suggestion appends the comment after the standard message and may be considered as a solution of
issue #99. The original wish was to include the comment before the standard message.
The changes are partly tested, but I have not been able to perform a full test of all changes (all assertion functions will be changed).
Be aware that I suggest to put the argument 'comment' before the argument 'add'. the reason is that I think this is a logical order. However, this my introduce breaking changes if users have been giving the arguments to assertion functions without using the name of the argument, i.e. not written "add = collection" but only "collection".