MCPcopy Index your code
hub / github.com/python/cpython / test_invalid_syntax_error_message

Method test_invalid_syntax_error_message

Lib/test/test_fstring.py:1694–1697  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1692 self.assertEqual(x, 10)
1693
1694 def test_invalid_syntax_error_message(self):
1695 with self.assertRaisesRegex(SyntaxError,
1696 "f-string: expecting '=', or '!', or ':', or '}'"):
1697 compile("f'{a $ b}'", "?", "exec")
1698
1699 def test_with_two_commas_in_format_specifier(self):
1700 error_msg = re.escape("Cannot specify ',' with ','.")

Callers

nothing calls this directly

Calls 2

assertRaisesRegexMethod · 0.95
compileFunction · 0.50

Tested by

no test coverage detected