def testBound( self ) :

		w = GafferUI.Window( borderWidth = 8 )
		b = GafferUI.Button()
		w.setChild( b )
		w.setVisible( True )

		w.setPosition( IECore.V2i( 100 ) )

		self.waitForIdle( 1000 )

		wb = w.bound()
		bb = b.bound()
		bbw = b.bound( relativeTo = w )

		self.failUnless( isinstance( wb, IECore.Box2i ) )
		self.failUnless( isinstance( bb, IECore.Box2i ) )
		self.failUnless( isinstance( bbw, IECore.Box2i ) )

		self.assertEqual( bb.size(), bbw.size() )
		self.assertEqual( bbw.min, wb.min - bb.min )
		self.assertEqual( b.size(), bb.size() )
dataset/ETHPy150Open ImageEngine/gaffer/python/GafferUITest/WidgetTest.py/WidgetTest.testBound/swapped operands of `-`