diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_fstring.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index 7ca1512ebb..d7143d154a 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -664,6 +664,9 @@ x = ( self.assertAllRaise(SyntaxError, 'unterminated string literal', ["f'{\n}'", ]) + def test_newlines_before_syntax_error(self): + self.assertAllRaise(SyntaxError, "invalid syntax", + ["f'{.}'", "\nf'{.}'", "\n\nf'{.}'"]) def test_backslashes_in_string_part(self): self.assertEqual(f'\t', '\t') |