TestCase_Traceback.py 685 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # -*- coding: utf-8 -*-
  2. """
  3. Script for traceback test.
  4. 2012.12.03: Created by: Konstantin M. <[email protected]>
  5. """
  6. import pprint
  7. class Loggers:
  8. def __init__(self):
  9. pass
  10. def __del__(self):
  11. pass
  12. def child_init(self, y):
  13. return 0
  14. def BuggyCode_lvl5(self, a):
  15. a / 0
  16. def BuggyCode_lvl4(self, a):
  17. return self.BuggyCode_lvl5(a)
  18. def BuggyCode_lvl3(self, a):
  19. return self.BuggyCode_lvl4(a)
  20. def BuggyCode_lvl2(self, a):
  21. return self.BuggyCode_lvl3(a)
  22. def BuggyCode(self, a, b=None):
  23. return self.BuggyCode_lvl2(a)
  24. def mod_init():
  25. return Loggers()
  26. if __name__ != "__main__":
  27. import Router
  28. else:
  29. mod_init().BuggyCode(0)