<s> import unittest <EOL> import Gaffer <EOL> import GafferUI <EOL> import GafferUITest <EOL> class SplinePlugGadgetTest ( GafferUITest . TestCase ) : <EOL> def testSelection ( self ) : <EOL> g = GafferUI . SplinePlugGadget ( ) <EOL> n = Gaffer . Node ( ) <EOL> p = Gaffer . SplineffPlug ( ) <EOL> n . addChild ( p ) <EOL> p1 = p . pointPlug ( p . addPoint ( ) ) <EOL> p2 = p . pointPlug ( p . addPoint ( ) ) <EOL> self . failIf ( p1 in g . selection ( ) ) <EOL> self . failIf ( p2 in g . selection ( ) ) <EOL> self . assertRaises ( Exception , g . selection ( ) . add , p1 ) <EOL> g . splines ( ) . add ( p ) <EOL> g . selection ( ) . add ( p1 ) <EOL> self . failUnless ( p1 in g . selection ( ) ) <EOL> g . selection ( ) . add ( p2 ) <EOL> self . failUnless ( p2 in g . selection ( ) ) <EOL> p . removePoint ( <NUM_LIT:1> ) <EOL> self . failIf ( p2 in g . selection ( ) ) <EOL> g . splines ( ) . remove ( p ) <EOL> self . failIf ( p1 in g . selection ( ) ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
