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
Prettifier not being used for property + future check #2174
Comments
@mdedetrich I am trying to look into this now, I think the one in commonTest shouldn't be the one you are after, the related code probably is in scalatest+scalacheck, I'll try to look that up. By the way I think your PR #2173 is a good one, though we should target 3.2.x-new so we can include in the next 3.2.15 release. Any reason you closed it? Cheers. |
@mdedetrich fyi the related asserting class should be this: I need to attend to lunch now, I'll dig further |
@mdedetrich Similar problem is noticed here: https://github.com/scalatest/scalatestplus-scalacheck/blob/main/project/GenResources.scala#L201 |
It caused test to fail and I just noticed that it was the wrong project (it was for Scalatest on JS, not JVM however I see that you noticed the exact same problem in a different project at #2174 (comment), will open the PR with that fix.) Do you want me to re-open the original PR as well? |
@cheeseng I have opened a new PR with your suggested fix to the correct project at scalatest/scalatestplus-scalacheck#57 and also re-opened #2173 and also made it based on |
@mdedetrich To continue our conversation from the closed #2173 , I think the following function is the cause for the problem you are seeing: It is not sync with what supported in our latest Prettifier, I'll try to write a unit test in scalatest+scalacheck and see if I can reproduce the problem, before trying to fix it. |
Perfect, you are right I think its not just the prettifier function. If you want you can commit directly ontop of my PR at scalatest/scalatestplus-scalacheck#57 or make a new PR as you see fit. |
…supported in current version of Prettifier in scalactic, this fixed the intended Prettifier not being used problem as filed here: scalatest/scalatest#2174 .
So in PR #2155 I fixed the
Prettifier
so that it works on case classes however I noticed that its still not being applied even when usingimplicit val prettifier: Prettifier = Prettifier.truncateAt(SizeLimit(10))
, i.e. withScalaFutures
(i.e..futureValue
) plusAnyPropSpecLike
(i.e.property
)The test can be seen at https://github.com/aiven/guardian-for-apache-kafka/blob/main/backup-s3/src/test/scala/io/aiven/guardian/kafka/backup/s3/RealS3BackupClientTest.scala#L95-L170 and the
Prettifer
is defined at https://github.com/aiven/guardian-for-apache-kafka/blob/main/core-s3/src/test/scala/io/aiven/guardian/kafka/s3/S3Spec.scala#L62 (note I have verified via Metals that the implicit is being used by the test).I wanted to debug this further, the code that is meant to be prettifying this statement is in
PropCheckerAsserting
specifically in the functionHowever for some reason I can find no reference to it in published jars (even though its included in
commonTest
project) in order to debug the test to figure out precisely whats going on.The text was updated successfully, but these errors were encountered: