Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
hhatto committed Apr 11, 2020
1 parent d8902ee commit 8aece2d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/test_autopep8.py
Expand Up @@ -4017,6 +4017,15 @@ def test_e702_with_dict_semicolon(self):
with autopep8_context(line) as result:
self.assertEqual(fixed, result)

def test_e702_with_e701_and_only_select_e702_option(self):
line = """\
for i in range(3):
if i == 1: print i; continue
print i
"""
with autopep8_context(line, options=["--select=E702"]) as result:
self.assertEqual(line, result)

def test_e703_with_inline_comment(self):
line = 'a = 5; # inline comment\n'
fixed = 'a = 5 # inline comment\n'
Expand Down

0 comments on commit 8aece2d

Please sign in to comment.