Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r70379:0f088917abce
Date: 2014-04-01 22:17 +0200
http://bitbucket.org/pypy/pypy/changeset/0f088917abce/
Log: Py3-ify some cpyext tests.
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
@@ -222,14 +222,14 @@
assert exc_info.value.errno == errno.EBADF
assert exc_info.value.strerror == os.strerror(errno.EBADF)
- def test_SetFromErrnoWithFilenameObject__PyString(self):
+ def test_SetFromErrnoWithFilenameObject__PyUnicode(self):
import errno, os
module = self.import_extension('foo', [
("set_from_errno", "METH_NOARGS",
'''
errno = EBADF;
- PyObject *filenameObject =
PyString_FromString("/path/to/file");
+ PyObject *filenameObject =
PyUnicode_FromString("/path/to/file");
PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError,
filenameObject);
Py_DECREF(filenameObject);
return NULL;
@@ -241,14 +241,14 @@
assert exc_info.value.errno == errno.EBADF
assert exc_info.value.strerror == os.strerror(errno.EBADF)
- def test_SetFromErrnoWithFilenameObject__PyInt(self):
+ def test_SetFromErrnoWithFilenameObject__PyLong(self):
import errno, os
module = self.import_extension('foo', [
("set_from_errno", "METH_NOARGS",
'''
errno = EBADF;
- PyObject *intObject = PyInt_FromLong(3);
+ PyObject *intObject = PyLong_FromLong(3);
PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError,
intObject);
Py_DECREF(intObject);
return NULL;
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit