

def testLoadScriptWithReferenceFromVersion0_14(self):
    shutil.copyfile((os.path.dirname(__file__) + '/references/version-0.14.0.0.grf'), '/tmp/test.grf')
    s = Gaffer.ScriptNode()
    s['fileName'].setValue((os.path.dirname(__file__) + '/scripts/referenceVersion-0.14.0.0.gfr'))
    with IECore.CapturingMessageHandler() as mh:
        s.load(continueOnError=True)
    self.assertEqual(len(mh.messages), 1)
    self.assertTrue(('KeyError: "\'fileName\'' in mh.messages[0].message))
    self.assertEqual(s['Reference']['testPlug'].getValue(), 2)

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferTest/ReferenceTest.py ReferenceTest.testLoadScriptWithReferenceFromVersion0_14/original