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

Method test_global_param_err_first

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

Source from the content-addressed store, hash-verified

3020 self._check_error("del a += b", "invalid syntax")
3021
3022 def test_global_param_err_first(self):
3023 source = """if 1:
3024 def error(a):
3025 global a # SyntaxError
3026 def error2():
3027 b = 1
3028 global b # SyntaxError
3029 """
3030 self._check_error(source, "parameter and global", lineno=3)
3031
3032 def test_nonlocal_param_err_first(self):
3033 source = """if 1:

Callers

nothing calls this directly

Calls 1

_check_errorMethod · 0.95

Tested by

no test coverage detected