[pypy-commit] pypy py3k: fix the syntax of few more tests

antocuni noreply at buildbot.pypy.org
Thu Feb 9 12:24:29 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r52269:8543f5fac60c
Date: 2012-02-09 12:13 +0100
http://bitbucket.org/pypy/pypy/changeset/8543f5fac60c/

Log:	fix the syntax of few more tests

diff --git a/pypy/interpreter/test/test_compiler.py b/pypy/interpreter/test/test_compiler.py
--- a/pypy/interpreter/test/test_compiler.py
+++ b/pypy/interpreter/test/test_compiler.py
@@ -934,7 +934,7 @@
          y
         """
         try:
-            exec source
+            exec(source)
         except IndentationError:
             pass
         else:
@@ -949,8 +949,8 @@
          z
         """
         try:
-            exec source
-        except IndentationError, e:
+            exec(source)
+        except IndentationError as e:
             assert e.msg == 'unindent does not match any outer indentation level'
         else:
             raise Exception("DID NOT RAISE")
@@ -960,14 +960,14 @@
         source1 = "x = (\n"
         source2 = "x = (\n\n"
         try:
-            exec source1
-        except SyntaxError, err1:
+            exec(source1)
+        except SyntaxError as err1:
             pass
         else:
             raise Exception("DID NOT RAISE")
         try:
-            exec source2
-        except SyntaxError, err2:
+            exec(source2)
+        except SyntaxError as err2:
             pass
         else:
             raise Exception("DID NOT RAISE")


More information about the pypy-commit mailing list