mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +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
|
|
@ -51,7 +51,7 @@ class TestImport(unittest.TestCase):
|
|||
self.rewrite_file('for')
|
||||
try: __import__(self.module_name)
|
||||
except SyntaxError: pass
|
||||
else: raise RuntimeError, 'Failed to induce SyntaxError'
|
||||
else: raise RuntimeError('Failed to induce SyntaxError')
|
||||
self.assert_(self.module_name not in sys.modules and
|
||||
not hasattr(sys.modules[self.package_name], 'foo'))
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ class TestImport(unittest.TestCase):
|
|||
|
||||
try: __import__(self.module_name)
|
||||
except NameError: pass
|
||||
else: raise RuntimeError, 'Failed to induce NameError.'
|
||||
else: raise RuntimeError('Failed to induce NameError.')
|
||||
|
||||
# ...now change the module so that the NameError doesn't
|
||||
# happen
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue