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

Method test_nonlocal_param_err_first

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

Source from the content-addressed store, hash-verified

3030 self._check_error(source, "parameter and global", lineno=3)
3031
3032 def test_nonlocal_param_err_first(self):
3033 source = """if 1:
3034 def error(a):
3035 nonlocal a # SyntaxError
3036 def error2():
3037 b = 1
3038 global b # SyntaxError
3039 """
3040 self._check_error(source, "parameter and nonlocal", lineno=3)
3041
3042 def test_raise_from_error_message(self):
3043 source = """if 1:

Callers

nothing calls this directly

Calls 1

_check_errorMethod · 0.95

Tested by

no test coverage detected