Skip to content

Commit

Permalink
Merge pull request #125 from elyezer/fix-124
Browse files Browse the repository at this point in the history
Make token matching case insensitive
  • Loading branch information
jyejare committed Jan 25, 2017
2 parents 8485ddf + 3cef230 commit 81c9842
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ minimum-tokens
.. note::

To help test case parsing, make sure that each test case docstring has the
tokens in the following format ``:token:``.
tokens in the following format ``:token:``. Also token matching is case
insensitive.

Sample Test Case
++++++++++++++++
Expand Down
5 changes: 3 additions & 2 deletions testimony/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ def testimony(
json, nocolor, tokens, minimum_tokens, report, path):
"""Inspect and report on the Python test cases."""
if tokens:
SETTINGS['tokens'] = [token.strip() for token in tokens.split(',')]
SETTINGS['tokens'] = [
token.strip().lower() for token in tokens.split(',')]
if minimum_tokens:
SETTINGS['minimum_tokens'] = [
token.strip() for token in minimum_tokens.split(',')]
token.strip().lower() for token in minimum_tokens.split(',')]
main(report, path, json, nocolor)

0 comments on commit 81c9842

Please sign in to comment.