From 06e5c21a835c0e923506c4ff27929f34e00761c2 Mon Sep 17 00:00:00 2001 From: monster <monster@ydb.tech> Date: Thu, 7 Jul 2022 14:41:37 +0300 Subject: fix ya.make --- library/python/runtime_py3/test/traceback/crash.py | 44 ---------------------- 1 file changed, 44 deletions(-) delete mode 100644 library/python/runtime_py3/test/traceback/crash.py (limited to 'library/python/runtime_py3/test/traceback/crash.py') diff --git a/library/python/runtime_py3/test/traceback/crash.py b/library/python/runtime_py3/test/traceback/crash.py deleted file mode 100644 index b5e36b3dd4..0000000000 --- a/library/python/runtime_py3/test/traceback/crash.py +++ /dev/null @@ -1,44 +0,0 @@ -import argparse -import cgitb -import sys -import time - -from IPython.core import ultratb - -from .mod import modfunc - - -def one(): - modfunc(two) # aaa - - -def two(): - three(42) - - -def three(x): - raise RuntimeError('Kaboom! I\'m dead: {}'.format(x)) - - -def main(): - hooks = { - 'default': lambda: sys.excepthook, - 'cgitb': lambda: cgitb.Hook(format='text'), - 'ultratb_color': lambda: ultratb.ColorTB(ostream=sys.stderr), - 'ultratb_verbose': lambda: ultratb.VerboseTB(ostream=sys.stderr), - } - - parser = argparse.ArgumentParser() - parser.add_argument('hook', choices=sorted(hooks), default='default') - - args = parser.parse_args() - - sys.excepthook = hooks[args.hook]() - - print('__name__ =', __name__) - print('__file__ =', __file__) - - time.time = lambda: 1531996624.0 # Freeze time - sys.executable = '<traceback test>' - - one() -- cgit v1.2.3