mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Raise statement normalization in Lib/test/.
This commit is contained in:
parent
e0281cab81
commit
3add4d78ff
47 changed files with 218 additions and 218 deletions
|
@ -9,7 +9,7 @@ class ExceptionTestCase(unittest.TestCase):
|
|||
hit_finally = False
|
||||
|
||||
try:
|
||||
raise Exception, 'nyaa!'
|
||||
raise Exception('nyaa!')
|
||||
except:
|
||||
hit_except = True
|
||||
else:
|
||||
|
@ -44,7 +44,7 @@ class ExceptionTestCase(unittest.TestCase):
|
|||
hit_finally = False
|
||||
|
||||
try:
|
||||
raise Exception, 'yarr!'
|
||||
raise Exception('yarr!')
|
||||
except:
|
||||
hit_except = True
|
||||
finally:
|
||||
|
@ -71,7 +71,7 @@ class ExceptionTestCase(unittest.TestCase):
|
|||
hit_except = False
|
||||
|
||||
try:
|
||||
raise Exception, 'ahoy!'
|
||||
raise Exception('ahoy!')
|
||||
except:
|
||||
hit_except = True
|
||||
|
||||
|
@ -92,7 +92,7 @@ class ExceptionTestCase(unittest.TestCase):
|
|||
hit_else = False
|
||||
|
||||
try:
|
||||
raise Exception, 'foo!'
|
||||
raise Exception('foo!')
|
||||
except:
|
||||
hit_except = True
|
||||
else:
|
||||
|
@ -132,7 +132,7 @@ class ExceptionTestCase(unittest.TestCase):
|
|||
|
||||
try:
|
||||
try:
|
||||
raise Exception, 'inner exception'
|
||||
raise Exception('inner exception')
|
||||
except:
|
||||
hit_inner_except = True
|
||||
finally:
|
||||
|
@ -159,7 +159,7 @@ class ExceptionTestCase(unittest.TestCase):
|
|||
else:
|
||||
hit_inner_else = True
|
||||
|
||||
raise Exception, 'outer exception'
|
||||
raise Exception('outer exception')
|
||||
except:
|
||||
hit_except = True
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue