-
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
Recheck is doing the wrong thing? #431
Comments
I debugged it a bit, and I think that at least part of a problem is in This is the one that actually runs the test way more times than the original run. Perhaps the expectation was that this function would split the generator and run the test just once? |
I think I may have found a workaround for now. It only works in the following condition:
E.g. this does not work: property {
let! str = Gen.string (Range.constant 1 5) Gen.alpha
return cnd str
} |> Property. recheckBool "..." and this does not work either: property {
let! str = Gen.string (Range.constant 1 5) Gen.alpha
Assert.True(cnd str)
} |> Property.recheck "..." but this does work: property {
let! str = Gen.string (Range.constant 1 5) Gen.alpha
return Assert.True(cnd str)
} |> Property.recheck "..." My current understanding is that I think, if we must insist that for recheck to work the property must fail, then maybe we should remove Of course it'd be better if But I do not really understand why |
Regarding your 47 printed values when running Regarding Regarding |
I mentioned the last two of these things to you in #419 |
I think that
recheck
functionality is actually a bit insane right now. It clearly does not do what it is supposed to do.Consider this example:
It fails with the following output:
Now, when I run it with
Property.recheckBool "0_594166620906336962_12853707185440443475_00000"
the output is:Clearly, not only it doesn't run once, but it also does significantly more work and arrives at the different result at the end!
@TysonMN Could be a regression in
recheck
re-implementation since0.11
?To my understanding, since
0.11
recheck
was re-implemented to only run once. Previously it would run all the tests and shrinks, now it is supposed to be optimised to only run the last failing test.However, in versions since
0.11
(I checked0.12
and the latest0.13
) therecheck
misbehaves in the described way.Which is also manifesting as #419
The text was updated successfully, but these errors were encountered: