Skip to content

word-count: Normalization independent testing #253

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

Closed
behrtam opened this issue Nov 21, 2015 · 2 comments
Closed

word-count: Normalization independent testing #253

behrtam opened this issue Nov 21, 2015 · 2 comments

Comments

@behrtam
Copy link
Contributor

behrtam commented Nov 21, 2015

When @wobh added a test for normalization in #207 @kytrinyx noted the following:

I like that it leaves the choice up to the implementer as to how to do normalization.

Sadly this is only true for that single test case, all other 10 assume lower case normalization.

The best way to fix this would be if Python or some built-in package like unittest would provide us with a case insensitive string comparison function or something like it. I couldn't find one but there has to be something. We can't be the first having this problem.

I wrote a prove of concept but as we can't ship additional modules with the cli and it only works with Python 3 that doesn't do the trick.
https://gist.github.com/behrtam/2894facca0f35f642300

@kytrinyx
Copy link
Member

I discovered that a bit later: exercism/problem-specifications#128

I don't know what the solution is.

@wobh
Copy link
Contributor

wobh commented Nov 22, 2015

Sorry for the oversight. Thank you for bringing it up. I looked around, and turned up this SO question from 2011 where case desensitizing strings in Python is discussed: http://stackoverflow.com/questions/62567/ignore-case-in-python-strings. I don't have any immediate sense of what, if anything from there is useful here.

@behrtam behrtam closed this as completed Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants