diff options
| author | Anthony Sottile <asottile@umich.edu> | 2019-01-29 23:17:45 -0800 |
|---|---|---|
| committer | Anthony Sottile <asottile@umich.edu> | 2019-01-29 23:17:45 -0800 |
| commit | 0c470a65d77dc04e0fc3d97af9c76a4512399d2a (patch) | |
| tree | 4d814029bf14e2e771e8cfe07767d963bc7926ea /tests | |
| parent | 22f16e4081e9df63c68279c2c14bc1dd6807a5a0 (diff) | |
| download | flake8-0c470a65d77dc04e0fc3d97af9c76a4512399d2a.tar.gz | |
Allow capitalized filenames in per-file-ignores
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/test_utils.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index afd1b43..b0eac9a 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -72,10 +72,18 @@ def test_parse_comma_separated_list(value, expected): 'f.py:\n E,F\ng.py:\n G,H', [('f.py', ['E', 'F']), ('g.py', ['G', 'H'])], ), + # capitalized filenames are ok too + ( + 'F.py,G.py: F,G', + [('F.py', ['F', 'G']), ('G.py', ['F', 'G'])], + ), # it's easier to allow zero filenames or zero codes than forbid it (':E', []), ('f.py:', []), (':E f.py:F', [('f.py', ['F'])]), ('f.py: g.py:F', [('g.py', ['F'])]), + ('f.py:E:', []), + ('f.py:E.py:', []), + ('f.py:Eg.py:F', [('Eg.py', ['F'])]), # sequences are also valid (?) ( ['f.py:E,F', 'g.py:G,H'], @@ -96,10 +104,9 @@ def test_parse_files_to_codes_mapping(value, expected): # eof while looking for filenames 'f.py', 'f.py:E,g.py' # colon while looking for codes - 'f.py::', 'f.py:E:', - + 'f.py::', # no separator between - 'f.py:Eg.py:F', 'f.py:E1F1', + 'f.py:E1F1', ), ) def test_invalid_file_list(value): |
