Author: Pauli Virtanen <[email protected]>
Branch: cpyext-tls-operror
Changeset: r94473:e33ecbb4d6bd
Date: 2018-03-20 21:37 +0100
http://bitbucket.org/pypy/pypy/changeset/e33ecbb4d6bd/

Log:    Use more specific exception for the test

diff --git a/pypy/module/cpyext/test/test_pyerrors.py 
b/pypy/module/cpyext/test/test_pyerrors.py
--- a/pypy/module/cpyext/test/test_pyerrors.py
+++ b/pypy/module/cpyext/test/test_pyerrors.py
@@ -500,7 +500,7 @@
              while (id == 0 && flag == 0);
              gilsave = PyGILState_Ensure();
 
-             PyErr_SetString(PyExc_ValueError, "failure");
+             PyErr_Format(PyExc_ValueError, "%d", id);
 
              /* Proceed in thread 0 first */
              if (id == 1) flag = 1;
@@ -523,7 +523,7 @@
                 module.emit_error(arg)
                 failures.append(True)
             except ValueError as exc:
-                if str(exc) != "failure":
+                if str(exc) != str(arg):
                     failures.append(exc)
 
         threads = [threading.Thread(target=worker, args=(j,))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to