()
| 432 | |
| 433 | |
| 434 | def test_comments() -> None: |
| 435 | source = '''def test(): |
| 436 | "comment 1" |
| 437 | x = 1 |
| 438 | # comment 2 |
| 439 | # comment 3 |
| 440 | |
| 441 | assert False |
| 442 | |
| 443 | """ |
| 444 | comment 4 |
| 445 | """ |
| 446 | ''' |
| 447 | for line in range(2, 6): |
| 448 | assert str(getstatement(line, source)) == " x = 1" |
| 449 | for line in range(6, 8): |
| 450 | assert str(getstatement(line, source)) == " assert False" |
| 451 | for line in range(8, 10): |
| 452 | assert str(getstatement(line, source)) == '"""\ncomment 4\n"""' |
| 453 | |
| 454 | |
| 455 | def test_comment_in_statement() -> None: |
nothing calls this directly
no test coverage detected