| Antoine Pitrou | dcedaf6 | 2013-07-31 23:14:08 +0200 | [diff] [blame] | 1 | """ |
| 2 | Fodder for module finalization tests in test_module. | ||||
| 3 | """ | ||||
| 4 | |||||
| 5 | import shutil | ||||
| 6 | import test.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.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() | ||||