[pypy-commit] pypy py3k: fix syntax

antocuni noreply at buildbot.pypy.org
Tue Feb 28 23:43:54 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r53009:ae3a4343a78d
Date: 2012-02-28 23:43 +0100
http://bitbucket.org/pypy/pypy/changeset/ae3a4343a78d/

Log:	fix syntax

diff --git a/pypy/tool/pytest/test/test_pytestsupport.py b/pypy/tool/pytest/test/test_pytestsupport.py
--- a/pypy/tool/pytest/test/test_pytestsupport.py
+++ b/pypy/tool/pytest/test/test_pytestsupport.py
@@ -49,18 +49,18 @@
     except AssertionError:
         pass
     else:
-        raise AssertionError, "app level AssertionError mixup!"
+        raise AssertionError("app level AssertionError mixup!")
 
 def app_test_exception_with_message():
     try:
         assert 0, "Failed"
-    except AssertionError, e:
+    except AssertionError as e:
         assert e.msg == "Failed"
 
 def app_test_comparison():
     try:
         assert 3 > 4
-    except AssertionError, e:
+    except AssertionError as e:
         assert "3 > 4" in e.msg
 
 
@@ -162,7 +162,7 @@
 def test_app_test_blow(testdir):
     conftestpath.copy(testdir.tmpdir)
     sorter = testdir.inline_runsource("""class AppTestBlow:
-    def test_one(self): exec 'blow'
+    def test_one(self): exec('blow')
     """)
 
     ev, = sorter.getreports("pytest_runtest_logreport")


More information about the pypy-commit mailing list