Author: thomas.heller Date: Fri Jan 25 21:34:11 2008 New Revision: 60299 Modified: python/branches/py3k-ctypes-pep3118/Lib/ctypes/test/test_pep3118.py Log: Add test for the readonly bit.
Modified: python/branches/py3k-ctypes-pep3118/Lib/ctypes/test/test_pep3118.py ============================================================================== --- python/branches/py3k-ctypes-pep3118/Lib/ctypes/test/test_pep3118.py (original) +++ python/branches/py3k-ctypes-pep3118/Lib/ctypes/test/test_pep3118.py Fri Jan 25 21:34:11 2008 @@ -25,7 +25,11 @@ self.failUnlessEqual(v.size, sizeof(ob)) self.failUnlessEqual(v.itemsize, sizeof(itemtp)) self.failUnlessEqual(v.shape, shape) + # ctypes object always have a non-strided memory block self.failUnlessEqual(v.strides, None) + # they are always read/write + self.failIf(v.readonly) + if v.shape: n = 1 for dim in v.shape: _______________________________________________ Python-3000-checkins mailing list Python-3000-checkins@python.org http://mail.python.org/mailman/listinfo/python-3000-checkins