[pypy-commit] pypy default: Rename the exception that we call TestException to some class name that

arigo pypy.commits at gmail.com
Thu Sep 1 05:55:15 EDT 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r86814:955998701207
Date: 2016-09-01 11:02 +0100
http://bitbucket.org/pypy/pypy/changeset/955998701207/

Log:	Rename the exception that we call TestException to some class name
	that doesn't start with Test, which confuses py.test

diff --git a/rpython/translator/c/test/test_exception.py b/rpython/translator/c/test/test_exception.py
--- a/rpython/translator/c/test/test_exception.py
+++ b/rpython/translator/c/test/test_exception.py
@@ -9,7 +9,7 @@
 getcompiledopt = test_backendoptimized.TestTypedOptimizedTestCase().getcompiled
 
 
-class TestException(Exception):
+class InTestException(Exception):
     pass
 
 class MyException(Exception):
@@ -18,7 +18,7 @@
 def test_simple1():
     def raise_(i):
         if i == 0:
-            raise TestException()
+            raise InTestException()
         elif i == 1:
             raise MyException()
         else:
@@ -29,7 +29,7 @@
             b = raise_(i) + 12
             c = raise_(i) + 13
             return a+b+c
-        except TestException:
+        except InTestException:
             return 7
         except MyException:
             return 123


More information about the pypy-commit mailing list