#NEWLINE# def testConnectionsForNestedPlugs( self ) : #NEWLINE# #INDENT# script = Gaffer . ScriptNode ( ) #NEWLINE# script [ 'n' ] = NestedPlugTestNode ( ) #NEWLINE# script [ 'n' ] [ 'c' ] = Gaffer . CompoundPlug ( ) #NEWLINE# script [ 'n' ] [ 'c' ] [ 'i' ] = Gaffer . IntPlug ( ) #NEWLINE# script [ 'n2' ] = NestedPlugTestNode ( ) #NEWLINE# script [ 'n2' ] [ 'c' ] = Gaffer . CompoundPlug ( direction = Gaffer . Plug . Direction . Out ) #NEWLINE# script [ 'n2' ] [ 'c' ] [ 'o' ] = Gaffer . IntPlug ( direction = Gaffer . Plug . Direction . Out ) #NEWLINE# script [ 'n' ] [ 'c' ] [ 'i' ] . setInput ( script [ 'n2' ] [ 'c' ] [ 'o' ] ) #NEWLINE# s = Gaffer . StandardSet ( script . children ( ) ) #NEWLINE# g = GafferUI . GraphGadget ( script , self ) #NEWLINE# c = g . connectionGadget ( script [ 'n' ] [ 'c' ] [ 'i' ] ) #NEWLINE# self . failUnless ( c ) #NEWLINE# self . failUnless ( c . srcNodule ( ) . plug ( ) . isSame ( script [ 'n2' ] [ 'c' ] [ 'o' ] ) ) #NEWLINE# self . failUnless ( c . dstNodule ( ) . plug ( ) . isSame ( script [ 'n' ] [ 'c' ] [ 'i' ] ) ) #NEWLINE# s . remove ( script [ 'n2' ] ) #NEWLINE# self . failUnless ( ( g . nodeGadget ( script [ 'n2' ] ) is None ) ) #NEWLINE# c = g . connectionGadget ( script [ 'n' ] [ 'c' ] [ 'i' ] ) #NEWLINE# self . failUnless ( c ) #NEWLINE# self . failUnless ( ( c . srcNodule ( ) is None ) ) #NEWLINE# self . failUnless ( c . dstNodule ( ) . plug ( ) . isSame ( script [ 'n' ] [ 'c' ] [ 'i' ] ) ) #NEWLINE# s . add ( script [ 'n2' ] ) #NEWLINE# self . failUnless ( g . nodeGadget ( script [ 'n2' ] ) ) #NEWLINE# c = g . connectionGadget ( script [ 'n' ] [ 'c' ] [ 'i' ] ) #NEWLINE# self . failUnless ( c ) #NEWLINE# self . failUnless ( c . srcNodule ( ) . plug ( ) . isSame ( script [ 'n2' ] [ 'c' ] [ 'o' ] ) ) #NEWLINE# self . failUnless ( c . dstNodule ( ) . plug ( ) . isSame ( script [ 'n' ] [ 'c' ] [ 'i' ] ) ) #NEWLINE# s . remove ( script [ 'n' ] ) #NEWLINE# self . failUnless ( ( g . nodeGadget ( script [ 'n' ] ) is None ) ) #NEWLINE# self . failUnless ( ( g . connectionGadget ( script [ 'n' ] [ 'c' ] [ 'i' ] ) is None ) ) #NEWLINE# s . add ( script [ 'n' ] ) #NEWLINE# self . failUnless ( g . nodeGadget ( script [ 'n' ] ) ) #NEWLINE# c = g . connectionGadget ( script [ 'n' ] [ 'c' ] [ 'i' ] ) #NEWLINE# self . failUnless ( c ) #NEWLINE# self . failUnless ( c . srcNodule ( ) . plug ( ) . isSame ( script [ 'n2' ] [ 'c' ] [ 'o' ] ) ) #NEWLINE# self . failUnless ( c . dstNodule ( ) . plug ( ) . isSame ( script [ 'n' ] [ 'c' ] [ 'i' ] ) )