Update of /cvsroot/pywin32/pywin32/win32/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19384/test
Modified Files:
test_win32api.py
Log Message:
Add SetLastError
Index: test_win32api.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32api.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** test_win32api.py 21 Jun 2006 12:07:21 -0000 1.10
--- test_win32api.py 16 Jul 2006 11:04:20 -0000 1.11
***************
*** 152,155 ****
--- 152,161 ----
self.assertEqual(result, "Hello Mark, how are you today?")
+ class Misc(unittest.TestCase):
+ def test_last_error(self):
+ for x in (0, 1, -1, winerror.TRUST_E_PROVIDER_UNKNOWN):
+ win32api.SetLastError(x)
+ self.failUnlessEqual(x, win32api.GetLastError())
+
if __name__ == '__main__':
unittest.main()
|