Skip to content

word-count: Normalization independent testing #253

Closed

Description

@behrtam

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

Activity

  1. kytrinyx commented on Nov 21, 2015

    @kytrinyx
    Member

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

    I don't know what the solution is.

  2. wobh commented on Nov 22, 2015

    @wobh
    Contributor

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions