final_a.py 411 B

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