[pypy-svn] pypy default: Skip these tests about c_longdouble, because it's not supported

arigo commits-noreply at bitbucket.org
Sat Feb 5 20:34:10 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r41635:3edf2a432212
Date: 2011-02-05 20:33 +0100
http://bitbucket.org/pypy/pypy/changeset/3edf2a432212/

Log:	Skip these tests about c_longdouble, because it's not supported by
	the struct or array modules.

diff --git a/pypy/module/test_lib_pypy/ctypes_tests/test_numbers.py b/pypy/module/test_lib_pypy/ctypes_tests/test_numbers.py
--- a/pypy/module/test_lib_pypy/ctypes_tests/test_numbers.py
+++ b/pypy/module/test_lib_pypy/ctypes_tests/test_numbers.py
@@ -112,6 +112,8 @@
 
     def test_sizes(self):
         for t in signed_types + unsigned_types + float_types:
+            if t is c_longdouble:   # no support for 'g' in the struct module
+                continue
             size = struct.calcsize(t._type_)
             # sizeof of the type...
             assert sizeof(t) == size
@@ -120,6 +122,8 @@
 
     def test_alignments(self):
         for t in signed_types + unsigned_types + float_types:
+            if t is c_longdouble:   # no support for 'g' in the struct module
+                continue
             code = t._type_ # the typecode
             align = struct.calcsize("c%c" % code) - struct.calcsize(code)
 
@@ -152,6 +156,8 @@
     def test_float_from_address(self):
         from array import array
         for t in float_types:
+            if t is c_longdouble:   # no support for 'g' in the array module
+                continue
             a = array(t._type_, [3.14])
             v = t.from_address(a.buffer_info()[0])
             assert v.value == a[0]


More information about the Pypy-commit mailing list