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

Method test_name_after_assign

Lib/test/test_global.py:38–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

36 check_syntax_error(self, prog_text, lineno=2, offset=5)
37
38 def test_name_after_assign(self):
39 prog_text = """\
40def fn():
41 name_assign = 1
42 global name_assign
43"""
44 check_syntax_error(self, prog_text, lineno=3, offset=5)
45
46 def test_name_after_use(self):
47 prog_text = """\

Callers

nothing calls this directly

Calls 1

check_syntax_errorFunction · 0.90

Tested by

no test coverage detected