From 8aece2d7277ad980a5d8e47c5863253025fe8b7c Mon Sep 17 00:00:00 2001 From: Hideo Hattori Date: Sat, 11 Apr 2020 15:48:11 +0900 Subject: [PATCH] add unit test --- test/test_autopep8.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test_autopep8.py b/test/test_autopep8.py index 56083994..5001f8f4 100755 --- a/test/test_autopep8.py +++ b/test/test_autopep8.py @@ -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'