mirror of https://github.com/python/cpython
update to use new symtable interface
This commit is contained in:
parent
97a01674b2
commit
11db72a5c3
|
@ -2,7 +2,8 @@ from test_support import verify
|
|||
|
||||
import _symtable
|
||||
|
||||
symbols, scopes = _symtable.symtable("def f(x): return x", "?", "exec")
|
||||
symbols = _symtable.symtable("def f(x): return x", "?", "exec")
|
||||
|
||||
verify(symbols[0].name == "global")
|
||||
verify(len([ste for ste in symbols.values() if ste.name == "f"]) == 1)
|
||||
|
||||
verify(symbols.has_key(0))
|
||||
verify(scopes.has_key(0))
|
||||
|
|
Loading…
Reference in New Issue