(self, keyword)
| 4653 | |
| 4654 | @pytest.mark.parametrize("keyword", ["else if", "if", "while", "for", "switch"]) |
| 4655 | def testControlClauseWithParensNewline(self, keyword): |
| 4656 | # The % 2 part is pseudorandom whitespace-support testing |
| 4657 | self.TestLintContains( |
| 4658 | f"{keyword}{['', ' '][len(keyword) % 2]}(condition)" |
| 4659 | f"{[' ', ''][len(keyword) % 2]}[[unlikely]]" |
| 4660 | f"{[' ', ''][len(keyword) % 2]}{{" |
| 4661 | f"{['', ' '][len(keyword) % 2]}do_something(); }}", |
| 4662 | f"Controlled statements inside brackets of {keyword} clause" |
| 4663 | f" should be on a separate line [whitespace/newline] [5]", |
| 4664 | ) |
| 4665 | |
| 4666 | @pytest.mark.parametrize("keyword", ["else", "do", "try"]) |
| 4667 | def testControlClauseWithoutParensNewline(self, keyword): |
nothing calls this directly
no test coverage detected