Skip to content

word-count: Normalization independent testing #253

Closed
@behrtam

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

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