##// END OF EJS Templates
Isolate the attack tests with setUp and tearDown methods
Jacob Evan Shreve -
Show More
@@ -1112,11 +1112,17 b' def test_set_custom_completer():'
1112 1112 ip.Completer.custom_matchers.pop()
1113 1113
1114 1114
1115 class TestShowTracebacksAttack(unittest.TestCase):
1115 class TestShowTracebackAttack(unittest.TestCase):
1116 1116 """Test that the interactive shell is resilient against the client attack of
1117 1117 manipulating the showtracebacks method. These attacks shouldn't result in an
1118 1118 unhandled exception in the kernel."""
1119 1119
1120 def setUp(self):
1121 self.orig_showtraceback = interactiveshell.InteractiveShell.showtraceback
1122
1123 def tearDown(self):
1124 interactiveshell.InteractiveShell.showtraceback = self.orig_showtraceback
1125
1120 1126 def test_set_show_tracebacks_none(self):
1121 1127 """Test the case of the client setting showtracebacks to None"""
1122 1128
General Comments 0
You need to be logged in to leave comments. Login now