summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorIan Stapleton Cordasco <graffatcolmingov@gmail.com>2017-07-28 06:10:12 -0500
committerIan Stapleton Cordasco <graffatcolmingov@gmail.com>2017-07-28 06:10:12 -0500
commita44a09f87a783ddfb15634ed0cf9aba76138f991 (patch)
treef6f211f4edbb7085cf768be374715a0afde53a5f /tests/unit
parent0239f15dcce323357f316a66225b0d4d2308de28 (diff)
downloadflake8-a44a09f87a783ddfb15634ed0cf9aba76138f991.tar.gz
Remediate one wafer thing decision logic bug
Previously we were hitting the catch-all return that decided the error was selected. Instead, let's add specific logic since we now know how we would hit that and we actually don't want it to be selected. Closes #354
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/test_decision_engine.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/unit/test_decision_engine.py b/tests/unit/test_decision_engine.py
index db9c270..354dc69 100644
--- a/tests/unit/test_decision_engine.py
+++ b/tests/unit/test_decision_engine.py
@@ -162,11 +162,10 @@ def test_decision_for(select_list, ignore_list, error_code, expected):
style_guide.Decision.Ignored),
(defaults.SELECT, ['E126'], [], ['I'], 'I101',
style_guide.Decision.Selected),
- # This next one should exercise the catch-all return and yes, this is
- # a *very* odd combination but users find much odder combinations
- # anyway.
(['E', 'W'], defaults.IGNORE, ['I'], [], 'I101',
- style_guide.Decision.Selected),
+ style_guide.Decision.Ignored),
+ # TODO(sigmavirus24) Figure out how to exercise the final catch-all
+ # return statement
]
)
def test_more_specific_decision_for_logic(select, ignore, extend_select,