[ctypes-commit] ctypes/unittests test_structures.py,1.25,1.26
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2004-11-04 18:04:58
|
Update of /cvsroot/ctypes/ctypes/unittests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29143 Modified Files: test_structures.py Log Message: Reenable some tests. Index: test_structures.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/unittests/test_structures.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** test_structures.py 22 Oct 2004 07:27:18 -0000 1.25 --- test_structures.py 4 Nov 2004 18:04:41 -0000 1.26 *************** *** 290,298 **** self.failUnlessEqual(items, [1, 2, 3]) ! # The following are bugs: # This fails with SystemError: bad arg to internal function ! # s.array[0] = 42 # and this one with IndexError: invalid index ! # s.array[1] = 42 if __name__ == '__main__': --- 290,313 ---- self.failUnlessEqual(items, [1, 2, 3]) ! # The following are bugs, but are included here because the unittests ! # also describe the current behaviour. ! # # This fails with SystemError: bad arg to internal function ! # or with IndexError (with a patch I have) ! try: ! s.array[0] = 42 ! except (SystemError, IndexError): ! pass ! items = [s.array[i] for i in range(3)] ! self.failUnlessEqual(items, [1, 2, 3]) ! # and this one with IndexError: invalid index ! try: ! s.array[1] = 42 ! except IndexError: ! pass ! ! items = [s.array[i] for i in range(3)] ! self.failUnlessEqual(items, [1, 2, 3]) if __name__ == '__main__': |