Lib/test/test_module/final_a.py
raw| 1 | """ |
| 2 | Fodder for module finalization tests in test_module. |
| 3 | """ |
| 4 | |
| 5 | import shutil |
| 6 | import test.test_module.final_b |
| 7 | |
| 8 | x = 'a' |
| 9 | |
| 10 | class C: |
| 11 | def __del__(self): |
| 12 | # Inspect module globals and builtins |
| 13 | print("x =", x) |
| 14 | print("final_b.x =", test.test_module.final_b.x) |
| 15 | print("shutil.rmtree =", getattr(shutil.rmtree, '__name__', None)) |
| 16 | print("len =", getattr(len, '__name__', None)) |
| 17 | |
| 18 | c = C() |
| 19 | _underscored = C() |