[pywin32-checkins] pywin32/win32/test test_security.py, 1.4, 1.5 test_pywintypes.py, 1.3, 1.4
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-12-11 00:24:59
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11587/test Modified Files: test_security.py test_pywintypes.py Log Message: Add simple comparison tests for PyTime and PySID objects. Index: test_security.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_security.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_security.py 31 May 2005 02:07:35 -0000 1.4 --- test_security.py 11 Dec 2008 00:24:53 -0000 1.5 *************** *** 13,16 **** --- 13,26 ---- pass + def testEqual(self): + self.failUnlessEqual(win32security.LookupAccountName('','Administrator')[0], + win32security.LookupAccountName('','Administrator')[0]) + + def testBuffer(self): + # hrm - what about py3k - intent is to check the buffer slots return + # something sane. + self.failUnlessEqual(buffer(win32security.LookupAccountName('','Administrator')[0]), + buffer(win32security.LookupAccountName('','Administrator')[0])) + def testMemory(self): pwr_sid = self.pwr_sid Index: test_pywintypes.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_pywintypes.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_pywintypes.py 26 May 2004 08:29:20 -0000 1.3 --- test_pywintypes.py 11 Dec 2008 00:24:53 -0000 1.4 *************** *** 22,25 **** --- 22,38 ---- return + def testPyTimeCompare(self): + t1 = pywintypes.Time(100) + t1_2 = pywintypes.Time(100) + t2 = pywintypes.Time(101) + + self.failUnlessEqual(t1, t1_2) + self.failUnless(t1 <= t1_2) + self.failUnless(t1_2 >= t1) + + self.failIfEqual(t1, t2) + self.failUnless(t1 < t2) + self.failUnless(t2 > t1 ) + def testGUID(self): s = "{00020400-0000-0000-C000-000000000046}" |