-
Notifications
You must be signed in to change notification settings - Fork 637
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
Clues don't get reported for some assertions #2720
Labels
assertions 🔍
Related to the assertion mechanisms within the testing framework.
bug 🐛
Issues that report a problem or error in the code.
Milestone
Comments
Can you try 4.6.4 as the 4.6.x branch had some clue related fixes.
…On Wed, 8 Dec 2021 at 12:01, Jeff Martin ***@***.***> wrote:
*Which version of Kotest are you using*
4.5.0
Hello,
Some assertions don't collect clue information before being thrown, so the
clue information never shows up in the failure reports.
Specifically, I noticed these null-handling functions seem to bypass the
clue system in my tests:
https://github.com/kotest/kotest/blob/master/kotest-assertions/kotest-assertions-shared/src/commonMain/kotlin/io/kotest/assertions/eq/Eq.kt#L56
I've only just glanced at the source code, but It looks like throwing
Assertions directly, rather than calling the failure function, doesn't
collect the clue information before it gets popped off the stack?
Those are instances I know of so far, but maybe other assertion functions
that throw raw Errors could cause the same problem?
Btw, I'm a longtime Kotest user. Love your project! =D
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2720>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGWDIJW6ATP5FOQJO3TUP6MO7ANCNFSM5JUNMNLQ>
.
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>.
|
I just upgraded to 4.6.4. The problem still happens. Thanks for looking into it. |
Ok we'll take a look.
…On Wed, 8 Dec 2021 at 14:02, Jeff Martin ***@***.***> wrote:
I just upgraded to 4.6.4. The problem still happens.
Thanks for looking into it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2720 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGW7Z7YTEJU6KZIL3ZDUP62UBANCNFSM5JUNMNLQ>
.
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>.
|
sksamuel
pushed a commit
that referenced
this issue
Dec 10, 2021
sksamuel
added
assertions 🔍
Related to the assertion mechanisms within the testing framework.
bug 🐛
Issues that report a problem or error in the code.
labels
Dec 10, 2021
Fixed in 5.0.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
assertions 🔍
Related to the assertion mechanisms within the testing framework.
bug 🐛
Issues that report a problem or error in the code.
Which version of Kotest are you using
4.5.0
Hello,
Some assertions don't collect clue information before being thrown, so the clue information never shows up in the failure reports.
Specifically, I noticed these null-handling functions seem to bypass the clue system in my tests:
https://github.com/kotest/kotest/blob/master/kotest-assertions/kotest-assertions-shared/src/commonMain/kotlin/io/kotest/assertions/eq/Eq.kt#L56
I've only just glanced at the source code, but It looks like throwing Assertions directly, rather than calling the failure function, doesn't collect the clue information before it gets popped off the stack?
Those are instances I know of so far, but maybe other assertion functions that throw raw Errors could cause the same problem?
Btw, I'm a longtime Kotest user. Love your project! =D
The text was updated successfully, but these errors were encountered: