(self, keyword)
| 4665 | |
| 4666 | @pytest.mark.parametrize("keyword", ["else", "do", "try"]) |
| 4667 | def testControlClauseWithoutParensNewline(self, keyword): |
| 4668 | # The % 2 part is pseudorandom whitespace-support testing |
| 4669 | self.TestLintContains( |
| 4670 | f"{keyword}{['', ' '][len(keyword) % 2]}{{" |
| 4671 | f"{[' ', ''][len(keyword) % 2]}do_something(); }}", |
| 4672 | f"Controlled statements inside brackets of {keyword} clause" |
| 4673 | f" should be on a separate line [whitespace/newline] [5]", |
| 4674 | ) |
| 4675 | |
| 4676 | def testControlClauseNewlineNameFalsePositives(self): |
| 4677 | self.TestLint(" else if_condition_do_something();", "") |
nothing calls this directly
no test coverage detected