aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/runtime_py3/test/traceback/crash.py
diff options
context:
space:
mode:
authormonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
committermonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
commit06e5c21a835c0e923506c4ff27929f34e00761c2 (patch)
tree75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /library/python/runtime_py3/test/traceback/crash.py
parent03f024c4412e3aa613bb543cf1660176320ba8f4 (diff)
downloadydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz
fix ya.make
Diffstat (limited to 'library/python/runtime_py3/test/traceback/crash.py')
-rw-r--r--library/python/runtime_py3/test/traceback/crash.py44
1 files changed, 0 insertions, 44 deletions
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()