def test( self ) :

		p = Gaffer.GraphComponent()
		c1 = Gaffer.GraphComponent()
		c2 = Gaffer.GraphComponent()
		p["c1"] = c1
		p["c2"] = c2

		s = Gaffer.StandardSet( p.children() )
		b = Gaffer.Behaviours.OrphanRemover( s )

		self.assertEqual( len( s ), 2 )
		self.assertTrue( c1 in s )
		self.assertTrue( c2 in s )

		p.removeChild( c1 )

		self.assertEqual( len( s ), 1 )
		self.assertFalse( c1 in s )
		self.assertTrue( c2 in s )

		p["c1"] = c1

		self.assertEqual( len( s ), 1 )
		self.assertFalse( c1 in s )
		self.assertTrue( c2 in s )

		s.add( c1 )

		self.assertEqual( len( s ), 2 )
		self.assertTrue( c1 in s )
		self.assertTrue( c2 in s )

		p.removeChild( c1 )

		self.assertEqual( len( s ), 1 )
		self.assertFalse( c1 in s )
		self.assertTrue( c2 in s )

		p.removeChild( c2 )

		self.assertEqual( len( s ), 0 )
		self.assertFalse( s in c1 )
		self.assertFalse( c2 in s )

		c3 = Gaffer.GraphComponent()
		s.add( c3 )

		self.assertEqual( len( s ), 1 )
		self.assertFalse( c1 in s )
		self.assertFalse( c2 in s )
		self.assertTrue( c3 in s )

		p["c3"] = c3

		self.assertEqual( len( s ), 1 )
		self.assertFalse( c1 in s )
		self.assertFalse( c2 in s )
		self.assertTrue( c3 in s )

		p.removeChild( c3 )

		self.assertEqual( len( s ), 0 )
		self.assertFalse( c1 in s )
		self.assertFalse( c2 in s )
		self.assertFalse( c3 in s )

		p["c3"] = c3
		s.add( c3 )

		self.assertEqual( len( s ), 1 )
		self.assertFalse( c1 in s )
		self.assertFalse( c2 in s )
		self.assertTrue( c3 in s )

		del b
		p.removeChild( c3 )

		self.assertEqual( len( s ), 1 )
		self.assertFalse( c1 in s )
		self.assertFalse( c2 in s )
		self.assertTrue( c3 in s )
dataset/ETHPy150Open ImageEngine/gaffer/python/GafferTest/OrphanRemoverTest.py/OrphanRemoverTest.test/swapped operands of `in`