Skip to content
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

More informative FailedCheckError messages #76

Open
subsetpark opened this issue May 17, 2019 · 0 comments
Open

More informative FailedCheckError messages #76

subsetpark opened this issue May 17, 2019 · 0 comments
Labels

Comments

@subsetpark
Copy link

subsetpark commented May 17, 2019

Given the highly expressive and nondeterministic nature of property checks, a failed property check can be a little difficult to debug. Ideally there would be help in the modules associated with each property (ie, the ability through the shell h/0 function to obtain a description of the tests associated with each property), as well as messages conveying the test that failed in the property check. Something like

property check `associative` failed for Witchcraft.Semigroup:

from

  a = generate(data) # 1
  b = generate(data) # 200
  c = generate(data) # 6

after 
 
  left = a |> Semigroup.append(b) |> Semigroup.append(c) # 10
  right = Semigroup.append(a, Semigroup.append(b, c)) # 7

we obtained

  equal?(left, right) # false 

Obviously there are many ways you lay it out, but the idea would be to point the developer in the direction of what their generated data looked like and what the relation was that failed.

Would a feature like this be interesting to you, and would you accept any pull requests towards it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants