summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2019-07-10 08:11:41 -0700
committerAnthony Sottile <asottile@umich.edu>2019-08-29 13:14:12 -0700
commit5144196abd99860a956c1b1ce7a4575b8e1d028b (patch)
treefcb1a355c1c2e9d8db77738c54fffe9ba3c16126 /tests
parent45ad2faf8f8f3bbeb882f6f98c850ee5e09a897a (diff)
downloadflake8-5144196abd99860a956c1b1ce7a4575b8e1d028b.tar.gz
Do not pass `noqa` to plugins, have flake8 decide whether to report
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/test_main.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/integration/test_main.py b/tests/integration/test_main.py
index 72e9621..8b78c04 100644
--- a/tests/integration/test_main.py
+++ b/tests/integration/test_main.py
@@ -128,6 +128,18 @@ def test_bug_report_successful(capsys):
assert err == ''
+def test_specific_noqa_does_not_clobber_pycodestyle_noqa(tmpdir, capsys):
+ """See https://gitlab.com/pycqa/flake8/issues/552."""
+ with tmpdir.as_cwd():
+ tmpdir.join('t.py').write("test = ('ABC' == None) # noqa: E501\n")
+ _call_main(['t.py'], retv=1)
+
+ out, err = capsys.readouterr()
+ assert out == '''\
+t.py:1:15: E711 comparison to None should be 'if cond is None:'
+'''
+
+
def test_obtaining_args_from_sys_argv_when_not_explicity_provided(capsys):
"""Test that arguments are obtained from 'sys.argv'."""
with mock.patch('sys.argv', ['flake8', '--help']):