Commit 6423b766 authored by Tres Seaver's avatar Tres Seaver

Backport r124565 from the trunk.

parent c54272c0
......@@ -115,26 +115,6 @@ class ExceptionHookTestCase(unittest.TestCase):
class ExceptionHookTest(ExceptionHookTestCase):
def testStringException1(self):
from zExceptions import Unauthorized
def f():
raise 'Unauthorized', 'x'
if sys.version_info < (2, 6):
self.assertRaises(Unauthorized, self.call, None, None, f)
else:
# Raising a string exception causes a TypeError on Python 2.6
self.assertRaises(TypeError, self.call, None, None, f)
def testStringException2(self):
from zExceptions import Redirect
def f():
raise 'Redirect', 'x'
if sys.version_info < (2, 6):
self.assertRaises(Redirect, self.call, None, None, f)
else:
# Raising a string exception causes a TypeError on Python 2.6
self.assertRaises(TypeError, self.call, None, None, f)
def testSystemExit(self):
def f():
raise SystemExit, 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment