mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Remove the exceptions builtin module, all the exceptions are already builtin.
This commit is contained in:
parent
f543348fff
commit
2633c69fae
15 changed files with 34 additions and 66 deletions
|
@ -294,20 +294,20 @@ class StructureTestCase(unittest.TestCase):
|
|||
# In Python 2.5, Exception is a new-style class, and the repr changed
|
||||
if issubclass(Exception, object):
|
||||
self.failUnlessEqual(msg,
|
||||
"(Phone) <type 'exceptions.TypeError'>: "
|
||||
"(Phone) <type 'TypeError'>: "
|
||||
"expected string or Unicode object, int found")
|
||||
else:
|
||||
self.failUnlessEqual(msg,
|
||||
"(Phone) exceptions.TypeError: "
|
||||
"(Phone) TypeError: "
|
||||
"expected string or Unicode object, int found")
|
||||
|
||||
cls, msg = self.get_except(Person, "Someone", ("a", "b", "c"))
|
||||
self.failUnlessEqual(cls, RuntimeError)
|
||||
if issubclass(Exception, object):
|
||||
self.failUnlessEqual(msg,
|
||||
"(Phone) <type 'exceptions.ValueError'>: too many initializers")
|
||||
"(Phone) <type 'ValueError'>: too many initializers")
|
||||
else:
|
||||
self.failUnlessEqual(msg, "(Phone) exceptions.ValueError: too many initializers")
|
||||
self.failUnlessEqual(msg, "(Phone) ValueError: too many initializers")
|
||||
|
||||
|
||||
def get_except(self, func, *args):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue