[pywin32-checkins] pywin32/win32/test test_pywintypes.py,1.2,1.3
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: Mark H. <mha...@us...> - 2004-05-26 08:29:43
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5368 Modified Files: test_pywintypes.py Log Message: Test we can create a GUID from raw bytes. Index: test_pywintypes.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_pywintypes.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_pywintypes.py 22 Jan 2004 04:39:48 -0000 1.2 --- test_pywintypes.py 26 May 2004 08:29:20 -0000 1.3 *************** *** 22,25 **** --- 22,33 ---- return + def testGUID(self): + s = "{00020400-0000-0000-C000-000000000046}" + iid = pywintypes.IID(s) + iid2 = pywintypes.IID(buffer(iid), True) + self.assertEquals(iid, iid2) + self.assertRaises(ValueError, pywintypes.IID, '00', True) # too short + self.assertRaises(TypeError, pywintypes.IID, 0, True) # no buffer + if __name__ == '__main__': unittest.main() |