-
Notifications
You must be signed in to change notification settings - Fork 42
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
Re-running counterexamples ignores changes to generators #30
Comments
Would it be possible to peek into the block passed into PropCheck and determine if the generators changed since the counter example was stored? I don't know how stable the internal property definitions within PropEr are. Maybe |
@alfert Do you have an idea how this could be fixed? |
Hmm, do you mean that we store a hash of the generator definition (= of the AST) together with the counter example? So, we could check whether this has changed and in that case rerun the property from scratch (i.e. without using the counter example)? I assume that this should work. |
Yes, that's what I meant. I was not yet able to come up with a way to retrieve such a hash yet, though. |
It depends on what the hash is about. If the generator is "only" the part of |
For "simple" generators, it might be possible to remember the seed value (if there is such a thing) when a test failed, use that to |
For future reference, this pull request in PropEr seems related (setting a seed for reproducibility). |
As proposed in May, i.e. 6 month ago, I close this item. |
#10 added re-running failing counterexamples. If the fix to a failing property is to change the generators, the counterexample will keep on failing until the persisted file is deleted.
Consider this obviously failing example:
Now, we fix this example by changing the generator:
But due to how counterexamples currently work, we still receive an error:
The text was updated successfully, but these errors were encountered: