Author: Ronan Lamy <[email protected]>
Branch: py3k-update
Changeset: r84032:641f1954ee8b
Date: 2016-04-29 16:58 +0100
http://bitbucket.org/pypy/pypy/changeset/641f1954ee8b/

Log:    2to3fy two tests

diff --git a/pypy/module/cpyext/test/test_object.py 
b/pypy/module/cpyext/test/test_object.py
--- a/pypy/module/cpyext/test/test_object.py
+++ b/pypy/module/cpyext/test/test_object.py
@@ -202,15 +202,15 @@
         module = self.import_extension('foo', [
             ("malloctest", "METH_NOARGS",
              """
-                 PyObject *obj = PyObject_MALLOC(sizeof(PyIntObject));
-                 obj = PyObject_Init(obj, &PyInt_Type);
+                 PyObject *obj = PyObject_MALLOC(sizeof(PyFloatObject));
+                 obj = PyObject_Init(obj, &PyFloat_Type);
                  if (obj != NULL)
-                     ((PyIntObject *)obj)->ob_ival = -424344;
+                     ((PyFloatObject *)obj)->ob_fval = -12.34;
                  return obj;
              """)])
         x = module.malloctest()
-        assert type(x) is int
-        assert x == -424344
+        assert type(x) is float
+        assert x == -12.34
 
     @pytest.mark.skipif(True, reason='realloc not fully implemented')
     def test_object_realloc(self):
diff --git a/pypy/module/cpyext/test/test_pystate.py 
b/pypy/module/cpyext/test/test_pystate.py
--- a/pypy/module/cpyext/test/test_pystate.py
+++ b/pypy/module/cpyext/test/test_pystate.py
@@ -44,10 +44,7 @@
              '''),
             ])
         module.double_ensure(0)
-        print '0 ok'
         module.double_ensure(1)
-        print '1 ok'
-
 
     def test_thread_state_get(self):
         module = self.import_extension('foo', [
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to