diff options
| author | Eric N. Vander Weele <ericvw@gmail.com> | 2019-07-28 10:39:27 -0400 |
|---|---|---|
| committer | Eric N. Vander Weele <ericvw@gmail.com> | 2019-07-28 10:43:06 -0400 |
| commit | 1757bce321c8276b6fad77ce15766f0c81e46957 (patch) | |
| tree | 0aadd9cc9ec1c5c2f2ec0d528030d05262018589 /tests/unit | |
| parent | f01011a403fd806571b8b0fa172ec39f54bb9e83 (diff) | |
| download | flake8-1757bce321c8276b6fad77ce15766f0c81e46957.tar.gz | |
utils: Tighten `parse_comma_separated_list()` contract further
Now that callers are ensuring that `value` is not `None`, we can further
tighten the contract and remove the conditional to account when `None`
is passed-in for `value`.
Additionally, add a new test vector to account for when an empty string
is passed in, which would fail `if no value`.
Diffstat (limited to 'tests/unit')
| -rw-r--r-- | tests/unit/test_utils.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 9fd03b2..151a76d 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -22,6 +22,7 @@ RELATIVE_PATHS = ["flake8", "pep8", "pyflakes", "mccabe"] ("E123,W234,,E206,,", ["E123", "W234", "E206"]), ("E123, W234,, E206,,", ["E123", "W234", "E206"]), ("E123,,W234,,E206,,", ["E123", "W234", "E206"]), + ("", []), ]) def test_parse_comma_separated_list(value, expected): """Verify that similar inputs produce identical outputs.""" |
