Ronald Oussoren <[email protected]> added the comment:
I should have included the failures in my first message, sorry about that.
IIRC the workaround in PyObjC I mention in my initial message does explicit
sign extension when needed.
W.r.t to the first couple of failures, not that:
struct.unpack('b', struct.pack('B', 130)) == (-126,)
======================================================================
FAIL: test_byte (ctypes.test.test_cfuncs.CFunctions)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_cfuncs.py",
line 21, in test_byte
self.assertEqual(self.S(), -126)
AssertionError: 130 != -126
======================================================================
FAIL: test_byte_plus (ctypes.test.test_cfuncs.CFunctions)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_cfuncs.py",
line 27, in test_byte_plus
self.assertEqual(self.S(), -126)
AssertionError: 130 != -126
======================================================================
FAIL: test_short (ctypes.test.test_cfuncs.CFunctions)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_cfuncs.py",
line 45, in test_short
self.assertEqual(self.S(), -32766)
AssertionError: 32770 != -32766
======================================================================
FAIL: test_short_plus (ctypes.test.test_cfuncs.CFunctions)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_cfuncs.py",
line 51, in test_short_plus
self.assertEqual(self.S(), -32766)
AssertionError: 32770 != -32766
======================================================================
FAIL: test_doubleresult (ctypes.test.test_functions.FunctionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_functions.py",
line 143, in test_doubleresult
self.assertEqual(result, -21)
AssertionError: 65771.0 != -21
======================================================================
FAIL: test_floatresult (ctypes.test.test_functions.FunctionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_functions.py",
line 131, in test_floatresult
self.assertEqual(result, -21)
AssertionError: 65771.0 != -21
======================================================================
FAIL: test_intresult (ctypes.test.test_functions.FunctionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_functions.py",
line 105, in test_intresult
self.assertEqual(result, -21)
AssertionError: 65771 != -21
======================================================================
FAIL: test_longdoubleresult (ctypes.test.test_functions.FunctionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_functions.py",
line 155, in test_longdoubleresult
self.assertEqual(result, -21)
AssertionError: 65771.0 != -21
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue13370>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com