Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r57462:6637d0469f1b
Date: 2012-09-21 00:03 +0200
http://bitbucket.org/pypy/pypy/changeset/6637d0469f1b/

Log:    cpyext: py3k-ify test_sysmodule.py

diff --git a/pypy/module/cpyext/test/test_sysmodule.py 
b/pypy/module/cpyext/test/test_sysmodule.py
--- a/pypy/module/cpyext/test/test_sysmodule.py
+++ b/pypy/module/cpyext/test/test_sysmodule.py
@@ -7,7 +7,7 @@
         module = self.import_extension('foo', [
             ("get", "METH_VARARGS",
              """
-                 char *name = PyString_AsString(PyTuple_GetItem(args, 0));
+                 char *name = _PyUnicode_AsString(PyTuple_GetItem(args, 0));
                  PyObject *retval = PySys_GetObject(name);
                  return PyBool_FromLong(retval != NULL);
              """)])
@@ -21,9 +21,9 @@
                  PySys_WriteStdout("format: %d\\n", 42);
                  Py_RETURN_NONE;
              """)])
-        import sys, StringIO
+        import sys, io
         prev = sys.stdout
-        sys.stdout = StringIO.StringIO()
+        sys.stdout = io.StringIO()
         try:
             module.writestdout()
             assert sys.stdout.getvalue() == "format: 42\n"
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to