(self)
| 928 | ]) |
| 929 | |
| 930 | def test_parens_in_expressions(self): |
| 931 | self.assertEqual(f'{3,}', '(3,)') |
| 932 | |
| 933 | self.assertAllRaise(SyntaxError, |
| 934 | "f-string: expecting a valid expression after '{'", |
| 935 | ["f'{,}'", |
| 936 | ]) |
| 937 | |
| 938 | self.assertAllRaise(SyntaxError, r"f-string: unmatched '\)'", |
| 939 | ["f'{3)+(4}'", |
| 940 | ]) |
| 941 | |
| 942 | def test_newlines_before_syntax_error(self): |
| 943 | self.assertAllRaise(SyntaxError, |
nothing calls this directly
no test coverage detected