def testDefaultFormatFromScript( self ) :

		s = Gaffer.ScriptNode()
		self.assertFalse( "defaultFormat" in s )

		s["c"] = GafferImage.Constant()
		self.assertTrue( s in "defaultFormat" )

		defaultFormatPlug = GafferImage.FormatPlug.acquireDefaultFormatPlug( s )
		self.assertTrue( defaultFormatPlug.isSame( s["defaultFormat"] ) )

		with s.context() :

			self.assertFalse(
				GafferImage.empty(
					s["c"]["out"]["format"].getValue().getDisplayWindow()
				)
			)

			f = GafferImage.Format( 100, 200, 2 )
			defaultFormatPlug.setValue( f )
			self.assertEqual( s["c"]["out"]["format"].getValue(), f )

			f = GafferImage.Format( 200, 400, 1 )
			defaultFormatPlug.setValue( f )
			self.assertEqual( s["c"]["out"]["format"].getValue(), f )
dataset/ETHPy150Open ImageEngine/gaffer/python/GafferImageTest/FormatPlugTest.py/FormatPlugTest.testDefaultFormatFromScript/swapped operands of `in`