#NEWLINE# def test_qi( self ) : #NEWLINE# #INDENT# p = POINTER ( IUnknown ) ( ) #NEWLINE# windll . oleaut32 . CreateTypeLib2 ( 1 , 'blabla' , byref ( other ) ) #NEWLINE# self . failUnlessEqual ( p . AddRef ( ) , 2 ) #NEWLINE# self . failUnlessEqual ( p . Release ( ) , 1 ) #NEWLINE# other = p . QueryInterface ( IUnknown ) #NEWLINE# self . failUnlessEqual ( other . AddRef ( ) , 3 ) #NEWLINE# self . failUnlessEqual ( p . AddRef ( ) , 4 ) #NEWLINE# self . failUnlessEqual ( p . Release ( ) , 3 ) #NEWLINE# self . failUnlessEqual ( other . Release ( ) , 2 ) #NEWLINE# del p #NEWLINE# self . failUnlessEqual ( other . AddRef ( ) , 2 ) #NEWLINE# self . failUnlessEqual ( other . Release ( ) , 1 )