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

Audit test files for assert/refute with no custom message #386

Closed
Cohen-Carlisle opened this issue Jun 28, 2016 · 16 comments
Closed

Audit test files for assert/refute with no custom message #386

Cohen-Carlisle opened this issue Jun 28, 2016 · 16 comments

Comments

@Cohen-Carlisle
Copy link
Member

These should have a custom message put in place as without them you get a very unhelpful message like this:

Failed assertion, no message given.

@kotp
Copy link
Member

kotp commented Jun 28, 2016

exercism/problem-specifications#230 talks about this, Let's open an issue on x-common for any that need them.

And for the non-generated ones, l think we could make a check listed note here and do PR's against the list?

@kytrinyx
Copy link
Member

Where they're generated, we can generate the custom message based on the inputs/outputs. The few times that we've had messages in the test data it's just been echoing the inputs, and it hasn't added any value.

@kotp
Copy link
Member

kotp commented Jun 29, 2016

If we can do a good job of it, I say go for it. Writing good error messages can be hard, just about as hard as naming things, and they are more important, because if they are there, they are intended to hold your hand a little bit, and definitely should not misinform. I would rather have a non-informative error message than a misleading one.

gchan pushed a commit to gchan/xruby that referenced this issue Oct 18, 2016
…ogram

Remove redundancy from the description of isogram
@kotp
Copy link
Member

kotp commented Jan 4, 2017

Currently these files still have this style of test:

  • exercises/allergies/allergies_test.rb
  • exercises/bracket-push/bracket_push_test.rb
  • exercises/clock/clock_test.rb
  • exercises/custom-set/custom_set_test.rb
  • exercises/grade-school/grade_school_test.rb
  • exercises/isogram/isogram_test.rb
  • exercises/leap/example.tt
  • exercises/leap/leap_test.rb
  • exercises/luhn/luhn_test.rb
  • exercises/pangram/pangram_test.rb
  • exercises/pythagorean-triplet/pythagorean_triplet_test.rb
  • exercises/queen-attack/queen_attack_test.rb
  • exercises/triangle/triangle_test.rb

@stale stale bot added the wontfix label Apr 29, 2017
@stale
Copy link

stale bot commented Apr 29, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@hilary
Copy link
Contributor

hilary commented Apr 30, 2017

I'd rather see effort put into created canonical data and converting exercises to using generators than into crafting error messages for non-generated test suites.

@kotp
Copy link
Member

kotp commented May 1, 2017

I wonder if @hilary comment will cause the Probot to now leave this open...

@kotp kotp added stale and removed wontfix labels May 1, 2017
@stale stale bot removed the stale label May 1, 2017
@kotp kotp added the stale label May 1, 2017
@stale stale bot removed the stale label May 1, 2017
@Insti
Copy link
Contributor

Insti commented May 1, 2017

I'd rather see effort put into created canonical data and converting exercises to using generators than into crafting error messages for non-generated test suites.

However, the generators should still be generating asserts with sensible failure messages, and we will need to check for this at some point.

@hilary
Copy link
Contributor

hilary commented May 2, 2017

I would far rather see good error messages in the canonical data than generated messages for assert/refute, as I have yet to find generated assert/refute messages useful.

If they're doing red/green, they're looking at the tests anyway... but hey, if someone wants to put the effort into adding generated messages for assert/refute, I realize that meaningful error messages in the canonical data is ... unlikely.

@stale stale bot added the stale label Jul 1, 2017
@stale
Copy link

stale bot commented Jul 1, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot closed this as completed Jul 8, 2017
@Insti
Copy link
Contributor

Insti commented Jul 20, 2017

This is still relevant

@kotp
Copy link
Member

kotp commented Oct 5, 2022

I think this can be closed now due to #1393 being merged.

@kotp kotp closed this as completed Oct 5, 2022
@kotp
Copy link
Member

kotp commented Oct 5, 2022

I wonder if that gave some Hacktoberfest credit for this year!

@kytrinyx
Copy link
Member

kytrinyx commented Oct 6, 2022

I doubt it. Also I don't participate in hacktoberfest :)

@kotp
Copy link
Member

kotp commented Oct 6, 2022

I think if anyone got points for it, it would have been Cohen.

@kytrinyx
Copy link
Member

kytrinyx commented Oct 6, 2022

I think that would be a most excellent outcome!

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

No branches or pull requests

5 participants