[ctypes-commit] ctypes/unittests test_paramflags.py,1.2,1.3
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2005-03-09 13:50:21
|
Update of /cvsroot/ctypes/ctypes/unittests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20542/unittests Modified Files: test_paramflags.py Log Message: Some fixes for linux. Index: test_paramflags.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/unittests/test_paramflags.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_paramflags.py 9 Mar 2005 07:37:36 -0000 1.2 --- test_paramflags.py 9 Mar 2005 13:49:43 -0000 1.3 *************** *** 18,22 **** def check_retval(self, val): if val == 0: ! raise WinError() _check_retval_ = classmethod(check_retval) --- 18,24 ---- def check_retval(self, val): if val == 0: ! # WindowsError would be bettter, but the tests must run ! # crossplatform ! raise ValueError(val) _check_retval_ = classmethod(check_retval) *************** *** 56,60 **** self.assertEqual(type(func(hwnd_desktop)), RECT) # ...unless the call fails ! self.assertRaises(WindowsError, lambda: func(0)) # TypeError: required argument 'hwnd' missing self.assertRaises(TypeError, lambda: func()) --- 58,62 ---- self.assertEqual(type(func(hwnd_desktop)), RECT) # ...unless the call fails ! self.assertRaises(ValueError, lambda: func(0)) # TypeError: required argument 'hwnd' missing self.assertRaises(TypeError, lambda: func()) *************** *** 79,83 **** self.assertEqual(type(func(hwnd=hwnd_desktop)), RECT) # ...unless the call fails ! self.assertRaises(WindowsError, lambda: func(0)) # TypeError: required argument 'hwnd' missing self.assertRaises(TypeError, lambda: func()) --- 81,85 ---- self.assertEqual(type(func(hwnd=hwnd_desktop)), RECT) # ...unless the call fails ! self.assertRaises(ValueError, lambda: func(0)) # TypeError: required argument 'hwnd' missing self.assertRaises(TypeError, lambda: func()) |