From 577774fa57619ea87682c0999d9e91cd1cdb7425 Mon Sep 17 00:00:00 2001 From: Hideo Hattori Date: Sat, 30 Oct 2021 13:18:06 +0900 Subject: [PATCH] add tests of simple case for e265 and e266 --- test/test_autopep8.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test_autopep8.py b/test/test_autopep8.py index a84623a2..13cd7c4d 100755 --- a/test/test_autopep8.py +++ b/test/test_autopep8.py @@ -2212,6 +2212,18 @@ def test_e262_more_complex(self): with autopep8_context(line) as result: self.assertEqual(fixed, result) + def test_e265(self): + line = "## comment\n123\n" + fixed = "# comment\n123\n" + with autopep8_context(line) as result: + self.assertEqual(fixed, result) + + def test_e266(self): + line = "#1 comment\n123\n" + fixed = "# 1 comment\n123\n" + with autopep8_context(line) as result: + self.assertEqual(fixed, result) + def test_e271(self): line = 'True and False\n' fixed = 'True and False\n'