Skip to content

Commit 824e1ca

Browse files
committed
add test for new message on t-strings
1 parent 7fc6def commit 824e1ca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Lib/test/test_tstring.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ def test_syntax_errors(self):
219219
("t'{lambda:1}'", "t-string: lambda expressions are not allowed "
220220
"without parentheses"),
221221
("t'{x:{;}}'", "t-string: expecting a valid expression after '{'"),
222+
("""t'{1:d\n}'""","t-string: newlines are not allowed in format specifiers")
222223
):
223224
with self.subTest(case), self.assertRaisesRegex(SyntaxError, err):
224225
eval(case)

0 commit comments

Comments
 (0)