From 5743d5278ac226b1827d89994ece4b0a5949172a 2020-02-11 19:56:38 From: Alex Hall Date: 2020-02-11 19:56:38 Subject: [PATCH] Fix doctest_tb_sysexit --- diff --git a/IPython/core/tests/test_iplib.py b/IPython/core/tests/test_iplib.py index 8f380f9..52fafca 100644 --- a/IPython/core/tests/test_iplib.py +++ b/IPython/core/tests/test_iplib.py @@ -173,31 +173,25 @@ In [24]: %tb SystemExit Traceback (most recent call last) ... in + 29 except IndexError: 30 mode = 'div' - 31 ---> 32 bar(mode) - global bar = - global mode = 'exit' + mode = 'exit' ... in bar(mode='exit') 20 except: 21 stat = 1 ---> 22 sysexit(stat, mode) - global sysexit = - stat = 2 mode = 'exit' + stat = 2 23 else: 24 raise ValueError('Unknown mode') ... in sysexit(stat=2, mode='exit') - 9 10 def sysexit(stat, mode): ---> 11 raise SystemExit(stat, 'Mode = %s' % mode) - global SystemExit = undefined stat = 2 mode = 'exit' - 12 - 13 def bar(mode): SystemExit: (2, 'Mode = exit') """