-
-
Notifications
You must be signed in to change notification settings - Fork 195
tests: Generate better error messages with 'assertEqual' #517
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
Comments
On one hand a coder's life consists of reading and understanding other people's code for most of the time. But preparing for real life is probably not the primary goal here, but preserving people's interest and fun. |
Will be interesting to see how this works for I hope it will not result in too much repetition in the test code, even if it is a secondary concern to providing information. |
:true-story: I always leave the tests opened while solving an exercise. I take it as a supplement of the description, plus it helps me learning about testing in Haskell. since we are talking about Tests / Learning Experience, did Exercism ever considered students writing tests (for an already implemented code) instead of implementing the solution? I know it can be highly framework biased, but learning to test an essential skill. |
|
When a test fails, most of the exercises just display the
expected
value, without stating what was evaluated:Sometimes the test case's description is enough to figure out what happened, but usually the user has to open the test suite to see the actual code being evaluated:
In this hypothetical case, the information needed by the student was:
Writing the test suite with
assertEqual
instead ofshoudBe
, it is easy to get all this output directly from the failed test:An now we get all the information when the test fails:
I believe that this is a small change that can make things easier for the students.
Should we do it to allow students avoid reading the test suite if they don't want to?
The text was updated successfully, but these errors were encountered: