Message147302
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 |
|
Date |
User |
Action |
Args |
2011-11-08 14:19:45 | ronaldoussoren | set | recipients:
+ ronaldoussoren, vstinner |
2011-11-08 14:19:45 | ronaldoussoren | set | messageid: <1320761985.91.0.754678579636.issue13370@psf.upfronthosting.co.za> |
2011-11-08 14:19:45 | ronaldoussoren | link | issue13370 messages |
2011-11-08 14:19:44 | ronaldoussoren | create | |
|