mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-06 21:16:54 +00:00
Don't reset indent_char when we encounter E101
This commit is contained in:
parent
121ea4f056
commit
fdcec2803a
4 changed files with 20 additions and 28 deletions
|
|
@ -51,6 +51,25 @@ index d64ac39..7d943de 100644
|
|||
assert err == ''
|
||||
|
||||
|
||||
def test_e101_indent_char_does_not_reset(tmpdir, capsys):
|
||||
"""Ensure that E101 with an existing indent_char does not reset it."""
|
||||
t_py_contents = """\
|
||||
if True:
|
||||
print('space indented')
|
||||
|
||||
s = '''\
|
||||
\ttab indented
|
||||
''' # noqa: E101
|
||||
|
||||
if True:
|
||||
print('space indented')
|
||||
"""
|
||||
|
||||
with tmpdir.as_cwd():
|
||||
tmpdir.join('t.py').write(t_py_contents)
|
||||
_call_main(['t.py'])
|
||||
|
||||
|
||||
def test_statistics_option(tmpdir, capsys):
|
||||
"""Ensure that `flake8 --statistics` works."""
|
||||
with tmpdir.as_cwd():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue