-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
word_count: test mixed case #234
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
The problem is not that normalization is tested. The problem is also not that the test is not opinionated about how to normalize case. My simple solution to the mixed case test is to expand the test string def test_mixed_case(self):
self.assertEqual([2, 3], sorted(list(word_count('go Go GO Stop stop').values()))) |
I actually don't mind which direction the user normalizes to, and I think that it would be nice to leave that up to the person solving the problem. I like this suggested approach and wouldn't mind changing the other tracks to use it. |
Okay, did it for the Python track. |
In exercism/python#234 we discussed how adding a second word in the normalization case can let a track might allow some languages to use sorted counts as a normalization-agnostic assertion.
In exercism/python#234 we discussed how adding a second word in the normalization case can let a track might allow some languages to use sorted counts as a normalization-agnostic assertion.
I just saw a solution to the
word_count
exercise where my feeling was that this shouldn't pass all tests. There is already one mixed case test, but it has a specific word order so that this solution works.The text was updated successfully, but these errors were encountered: