summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_future.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-01-10 16:19:56 (GMT)
committerGuido van Rossum <guido@python.org>2007-01-10 16:19:56 (GMT)
commitb940e113bf90ff71b0ef57414ea2beea9d2a4bc0 (patch)
tree0b9ea19eba1e665dac95126c3140ac2bc36326ad /Lib/test/test_future.py
parent893523e80a2003d4a630aafb84ba016e0070cbbd (diff)
downloadcpython-b940e113bf90ff71b0ef57414ea2beea9d2a4bc0.zip
cpython-b940e113bf90ff71b0ef57414ea2beea9d2a4bc0.tar.gz
cpython-b940e113bf90ff71b0ef57414ea2beea9d2a4bc0.tar.bz2
SF patch 1631942 by Collin Winter:
(a) "except E, V" -> "except E as V" (b) V is now limited to a simple name (local variable) (c) V is now deleted at the end of the except block
Diffstat (limited to 'Lib/test/test_future.py')
-rw-r--r--Lib/test/test_future.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_future.py b/Lib/test/test_future.py
index 9a5f829..1437489 100644
--- a/Lib/test/test_future.py
+++ b/Lib/test/test_future.py
@@ -29,7 +29,7 @@ class FutureTest(unittest.TestCase):
def test_badfuture3(self):
try:
from test import badsyntax_future3
- except SyntaxError, msg:
+ except SyntaxError as msg:
self.assertEqual(get_error_location(msg), ("badsyntax_future3", '3'))
else:
self.fail("expected exception didn't occur")
@@ -37,7 +37,7 @@ class FutureTest(unittest.TestCase):
def test_badfuture4(self):
try:
from test import badsyntax_future4
- except SyntaxError, msg:
+ except SyntaxError as msg:
self.assertEqual(get_error_location(msg), ("badsyntax_future4", '3'))
else:
self.fail("expected exception didn't occur")
@@ -45,7 +45,7 @@ class FutureTest(unittest.TestCase):
def test_badfuture5(self):
try:
from test import badsyntax_future5
- except SyntaxError, msg:
+ except SyntaxError as msg:
self.assertEqual(get_error_location(msg), ("badsyntax_future5", '4'))
else:
self.fail("expected exception didn't occur")
@@ -53,7 +53,7 @@ class FutureTest(unittest.TestCase):
def test_badfuture6(self):
try:
from test import badsyntax_future6
- except SyntaxError, msg:
+ except SyntaxError as msg:
self.assertEqual(get_error_location(msg), ("badsyntax_future6", '3'))
else:
self.fail("expected exception didn't occur")
@@ -61,7 +61,7 @@ class FutureTest(unittest.TestCase):
def test_badfuture7(self):
try:
from test import badsyntax_future7
- except SyntaxError, msg:
+ except SyntaxError as msg:
self.assertEqual(get_error_location(msg), ("badsyntax_future7", '3'))
else:
self.fail("expected exception didn't occur")
@@ -69,7 +69,7 @@ class FutureTest(unittest.TestCase):
def test_badfuture8(self):
try:
from test import badsyntax_future8
- except SyntaxError, msg:
+ except SyntaxError as msg:
self.assertEqual(get_error_location(msg), ("badsyntax_future8", '3'))
else:
self.fail("expected exception didn't occur")
@@ -77,7 +77,7 @@ class FutureTest(unittest.TestCase):
def test_badfuture9(self):
try:
from test import badsyntax_future9
- except SyntaxError, msg:
+ except SyntaxError as msg:
self.assertEqual(get_error_location(msg), ("badsyntax_future9", '3'))
else:
self.fail("expected exception didn't occur")