(self)
| 608 | |
| 609 | @unittest.skipIf(support.is_wasi, "exhausts limited stack on WASI") |
| 610 | def test_mismatched_parens(self): |
| 611 | self.assertAllRaise(SyntaxError, r"closing parenthesis '\}' " |
| 612 | r"does not match opening parenthesis '\('", |
| 613 | ["f'{((}'", |
| 614 | ]) |
| 615 | self.assertAllRaise(SyntaxError, r"closing parenthesis '\)' " |
| 616 | r"does not match opening parenthesis '\['", |
| 617 | ["f'{a[4)}'", |
| 618 | ]) |
| 619 | self.assertAllRaise(SyntaxError, r"closing parenthesis '\]' " |
| 620 | r"does not match opening parenthesis '\('", |
| 621 | ["f'{a(4]}'", |
| 622 | ]) |
| 623 | self.assertAllRaise(SyntaxError, r"closing parenthesis '\}' " |
| 624 | r"does not match opening parenthesis '\['", |
| 625 | ["f'{a[4}'", |
| 626 | ]) |
| 627 | self.assertAllRaise(SyntaxError, r"closing parenthesis '\}' " |
| 628 | r"does not match opening parenthesis '\('", |
| 629 | ["f'{a(4}'", |
| 630 | ]) |
| 631 | self.assertRaises(SyntaxError, eval, "f'{" + "("*20 + "}'") |
| 632 | |
| 633 | @unittest.skipIf(support.is_wasi, "exhausts limited stack on WASI") |
| 634 | def test_fstring_nested_too_deeply(self): |
nothing calls this directly
no test coverage detected