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

Method test_expression_with_assignment

Lib/test/test_syntax.py:2978–2983  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2976 self.fail("compile() did not raise SyntaxError")
2977
2978 def test_expression_with_assignment(self):
2979 self._check_error(
2980 "print(end1 + end2 = ' ')",
2981 'expression cannot contain assignment, perhaps you meant "=="?',
2982 offset=7
2983 )
2984
2985 def test_curly_brace_after_primary_raises_immediately(self):
2986 self._check_error("f{}", "invalid syntax", mode="single")

Callers

nothing calls this directly

Calls 1

_check_errorMethod · 0.95

Tested by

no test coverage detected