File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1112,11 +1112,17 @@ def foo(*args, **kwargs):
11121112 ip .Completer .custom_matchers .pop ()
11131113
11141114
1115- class TestShowTracebacksAttack (unittest .TestCase ):
1115+ class TestShowTracebackAttack (unittest .TestCase ):
11161116 """Test that the interactive shell is resilient against the client attack of
11171117 manipulating the showtracebacks method. These attacks shouldn't result in an
11181118 unhandled exception in the kernel."""
11191119
1120+ def setUp (self ):
1121+ self .orig_showtraceback = interactiveshell .InteractiveShell .showtraceback
1122+
1123+ def tearDown (self ):
1124+ interactiveshell .InteractiveShell .showtraceback = self .orig_showtraceback
1125+
11201126 def test_set_show_tracebacks_none (self ):
11211127 """Test the case of the client setting showtracebacks to None"""
11221128
You can’t perform that action at this time.
0 commit comments