Skip to content

Commit

Permalink
add test for verbose log
Browse files Browse the repository at this point in the history
  • Loading branch information
hhatto committed Apr 11, 2020
1 parent c1f66e8 commit 761b0b0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/test_autopep8.py
Original file line number Diff line number Diff line change
Expand Up @@ -5284,6 +5284,19 @@ def test_verbose_diff(self):
verbose_error = p.communicate()[1].decode('utf-8')
self.assertIn('------------', verbose_error)

def test_verbose_with_select_e702(self):
line = """\
for i in range(3):
if i == 1: print i; continue
print i
"""
with temporary_file_context(line) as filename:
p = Popen(list(AUTOPEP8_CMD_TUPLE) +
[filename, '-vvv', '--select=E702'],
stdout=PIPE, stderr=PIPE)
verbose_error = p.communicate()[1].decode('utf-8')
self.assertIn(" with other compound statements", verbose_error)

def test_in_place(self):
line = "'abc' \n"
fixed = "'abc'\n"
Expand Down

0 comments on commit 761b0b0

Please sign in to comment.