<s> import os <EOL> import unittest <EOL> from comtypes import GUID <EOL> class Test ( unittest . TestCase ) : <EOL> def test ( self ) : <EOL> self . failUnlessEqual ( GUID ( ) , GUID ( ) ) <EOL> self . failUnlessEqual ( GUID ( "<STR_LIT>" ) , <EOL> GUID ( "<STR_LIT>" ) ) <EOL> self . failUnlessEqual ( str ( GUID ( "<STR_LIT>" ) ) , <EOL> "<STR_LIT>" ) <EOL> self . failUnlessEqual ( repr ( GUID ( "<STR_LIT>" ) ) , <EOL> '<STR_LIT>' ) <EOL> self . assertRaises ( WindowsError , GUID , "<STR_LIT:abc>" ) <EOL> self . assertRaises ( WindowsError , GUID . from_progid , "<STR_LIT:abc>" ) <EOL> self . assertRaises ( WindowsError , lambda guid : guid . as_progid ( ) , <EOL> GUID ( "<STR_LIT>" ) ) <EOL> if os . name == "<STR_LIT>" : <EOL> self . failUnlessEqual ( GUID . from_progid ( "<STR_LIT>" ) , <EOL> GUID ( "<STR_LIT>" ) ) <EOL> self . failUnlessEqual ( GUID ( "<STR_LIT>" ) . as_progid ( ) , <EOL> u'<STR_LIT>' ) <EOL> elif os . name == "<STR_LIT>" : <EOL> self . failUnlessEqual ( GUID . from_progid ( "<STR_LIT>" ) , <EOL> GUID ( "<STR_LIT>" ) ) <EOL> self . failUnlessEqual ( GUID ( "<STR_LIT>" ) . as_progid ( ) , <EOL> u'<STR_LIT>' ) <EOL> self . failIfEqual ( GUID . create_new ( ) , GUID . create_new ( ) ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
