class_super_object.py 448 B

12345678910111213141516171819202122
  1. # Calling object.__init__() via super().__init__
  2. try:
  3. # If we don't expose object.__init__ (small ports), there's
  4. # nothing to test.
  5. object.__init__
  6. except AttributeError:
  7. print("SKIP")
  8. raise SystemExit
  9. class Test(object):
  10. def __init__(self):
  11. super().__init__()
  12. print("Test.__init__")
  13. t = Test()
  14. class Test2:
  15. def __init__(self):
  16. super().__init__()
  17. print("Test2.__init__")
  18. t = Test2()