mirror of
https://github.com/python/cpython.git
synced 2026-02-27 17:41:12 +00:00
The new test case demonstrates the bug. Be more careful in symtable_resolve_free() to add a var to cells or frees only if it won't be added under some other rule. XXX Add new assertion that will catch this bug.
20 lines
484 B
Text
20 lines
484 B
Text
test_scope
|
|
1. simple nesting
|
|
2. extra nesting
|
|
3. simple nesting + rebinding
|
|
4. nesting with global but no free
|
|
5. nesting through class
|
|
6. nesting plus free ref to global
|
|
7. nearest enclosing scope
|
|
8. mixed freevars and cellvars
|
|
9. free variable in method
|
|
10. recursion
|
|
11. unoptimized namespaces
|
|
12. lambdas
|
|
13. UnboundLocal
|
|
14. complex definitions
|
|
15. scope of global statements
|
|
16. check leaks
|
|
17. class and global
|
|
18. verify that locals() works
|
|
19. var is bound and free in class
|