mirror of https://github.com/python/cpython
Whitespace normalization.
This commit is contained in:
parent
9e9ef9fa5a
commit
dd55b0a32c
|
@ -31,7 +31,7 @@ class ExceptionTests(unittest.TestCase):
|
||||||
self.assertEquals(exc.__name__, excname)
|
self.assertEquals(exc.__name__, excname)
|
||||||
|
|
||||||
def testRaising(self):
|
def testRaising(self):
|
||||||
self.raise_catch(AttributeError, "AttributeError")
|
self.raise_catch(AttributeError, "AttributeError")
|
||||||
self.assertRaises(AttributeError, getattr, sys, "undefined_attribute")
|
self.assertRaises(AttributeError, getattr, sys, "undefined_attribute")
|
||||||
|
|
||||||
self.raise_catch(EOFError, "EOFError")
|
self.raise_catch(EOFError, "EOFError")
|
||||||
|
@ -184,10 +184,10 @@ class ExceptionTests(unittest.TestCase):
|
||||||
"""test that exception attributes are happy."""
|
"""test that exception attributes are happy."""
|
||||||
try: str(u'Hello \u00E1')
|
try: str(u'Hello \u00E1')
|
||||||
except Exception, e: sampleUnicodeEncodeError = e
|
except Exception, e: sampleUnicodeEncodeError = e
|
||||||
|
|
||||||
try: unicode('\xff')
|
try: unicode('\xff')
|
||||||
except Exception, e: sampleUnicodeDecodeError = e
|
except Exception, e: sampleUnicodeDecodeError = e
|
||||||
|
|
||||||
exceptionList = [
|
exceptionList = [
|
||||||
( BaseException, (), { 'message' : '', 'args' : () }),
|
( BaseException, (), { 'message' : '', 'args' : () }),
|
||||||
( BaseException, (1, ), { 'message' : 1, 'args' : ( 1, ) }),
|
( BaseException, (1, ), { 'message' : 1, 'args' : ( 1, ) }),
|
||||||
|
@ -267,7 +267,7 @@ class ExceptionTests(unittest.TestCase):
|
||||||
repr(expected[checkArgName]),
|
repr(expected[checkArgName]),
|
||||||
'exception "%s", attribute "%s"' %
|
'exception "%s", attribute "%s"' %
|
||||||
(repr(e), checkArgName))
|
(repr(e), checkArgName))
|
||||||
|
|
||||||
# test for pickling support
|
# test for pickling support
|
||||||
new = pickle.loads(pickle.dumps(e, random.randint(0, 2)))
|
new = pickle.loads(pickle.dumps(e, random.randint(0, 2)))
|
||||||
for checkArgName in expected.keys():
|
for checkArgName in expected.keys():
|
||||||
|
|
Loading…
Reference in New Issue