diff options
Diffstat (limited to 'Lib/test/test_fstring.py')
-rw-r--r-- | Lib/test/test_fstring.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index 086bf67..8205083 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -92,6 +92,13 @@ f'{a * x()}'""" exec(c) self.assertEqual(x[0], 'foo3') + def test_compile_time_concat_errors(self): + self.assertAllRaise(SyntaxError, + 'cannot mix bytes and nonbytes literals', + [r"""f'' b''""", + r"""b'' f''""", + ]) + def test_literal(self): self.assertEqual(f'', '') self.assertEqual(f'a', 'a') |