Commits

Philip Jenvey committed 5ad2066

these skips appear to work now, w/ some minor py3 adjustments

Comments (0)

Files changed (3)

pypy/module/_ffi/test/test_funcptr.py

                 return x+y;
             }
         """
-        py3k_skip('missing support for longs')
         import sys
         from _ffi import CDLL, types
         libfoo = CDLL(self.libfoo_name)
                 return len;
             }
         """
-        py3k_skip('missing support for unicode')
         from _ffi import CDLL, types
         import _rawffi
         libfoo = CDLL(self.libfoo_name)
         mystrlen = libfoo.getfunc('mystrlen', [types.char_p], types.slong)
         #
         # first, try automatic conversion from a string
-        assert mystrlen('foobar') == 6
+        assert mystrlen(b'foobar') == 6
         # then, try to pass an explicit pointer
         CharArray = _rawffi.Array('c')
-        mystr = CharArray(7, 'foobar')
+        mystr = CharArray(7, b'foobar')
         assert mystrlen(mystr.buffer) == 6
         mystr.free()
         mystrlen.free_temp_buffers()
                 return s;
             }
         """
-        py3k_skip('missing support for unicode')
         from _ffi import CDLL, types
         import _rawffi
         libfoo = CDLL(self.libfoo_name)
         do_nothing = libfoo.getfunc('do_nothing', [types.char_p], types.char_p)
         CharArray = _rawffi.Array('c')
         #
-        ptr = do_nothing('foobar')
+        ptr = do_nothing(b'foobar')
         array = CharArray.fromaddress(ptr, 7)
-        assert list(array) == list('foobar\00')
+        assert bytes(array) == b'foobar\00'
         do_nothing.free_temp_buffers()
 
     def test_typed_pointer_args(self):
                 return x+y;
             }
         """
-        py3k_skip('missing support for longs')
         import sys
         from _ffi import CDLL, types
         libfoo = CDLL(self.libfoo_name)
                 return x+y;
             }
         """
-        py3k_skip('missing support for ulonglong')
         from _ffi import CDLL, types
         maxint64 = 9223372036854775807 # maxint64+1 does not fit into a
                                        # longlong, but it does into a

pypy/module/_multiprocessing/test/test_memory.py

         raises(TypeError, _multiprocessing.address_of_buffer, "a")
 
     def test_mmap_address(self):
-        py3k_skip('ctypes not working yet')
         import mmap
         import _multiprocessing
 
         sizeof_double = _ctypes.sizeof(c_double)
 
         buf = mmap.mmap(-1, 300)
-        buf[0:300] = '\0' * 300
+        buf[0:300] = b'\0' * 300
 
         # Get the address of shared memory
         address, length = _multiprocessing.address_of_buffer(buf)
 
         # build a ctypes object from it
         var = c_double.from_address(address)
-        assert buf[0:sizeof_double] == '\0' * sizeof_double
+        assert buf[0:sizeof_double] == b'\0' * sizeof_double
         assert var.value == 0
 
         # check that both objects share the same memory
         var.value = 123.456
-        assert buf[0:sizeof_double] != '\0' * sizeof_double
-        buf[0:sizeof_double] = '\0' * sizeof_double
+        assert buf[0:sizeof_double] != b'\0' * sizeof_double
+        buf[0:sizeof_double] = b'\0' * sizeof_double
         assert var.value == 0

pypy/module/_rawffi/test/test__rawffi.py

         raises(ValueError, "_rawffi.Array('xx')")
 
     def test_longs_ulongs(self):
-        py3k_skip('fails on 32bit')
         import _rawffi
         lib = _rawffi.CDLL(self.lib_name)
         some_huge_value = lib.ptr('some_huge_value', [], 'q')
         cb.free()
 
     def test_another_callback(self):
-        py3k_skip('fails on 32bit')
         import _rawffi
         lib = _rawffi.CDLL(self.lib_name)
         runcallback = lib.ptr('runcallback', ['P'], 'q')
         a.free()
 
     def test_truncate(self):
-        py3k_skip('int vs long')
         import _rawffi, struct
         a = _rawffi.Array('b')(1)
         a[0] = -5