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

Method test_raise_from_error_message

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

Source from the content-addressed store, hash-verified

3040 self._check_error(source, "parameter and nonlocal", lineno=3)
3041
3042 def test_raise_from_error_message(self):
3043 source = """if 1:
3044 raise AssertionError() from None
3045 print(1,,2)
3046 """
3047 self._check_error(source, "invalid syntax", lineno=3)
3048
3049 def test_yield_outside_function(self):
3050 self._check_error("if 0: yield", "outside function")

Callers

nothing calls this directly

Calls 1

_check_errorMethod · 0.95

Tested by

no test coverage detected