Test load/save
(self)
| 212 | self.assertTrue(a == IECore.UIntData(255)) |
| 213 | |
| 214 | def testLoadSave(self): |
| 215 | """Test load/save""" |
| 216 | |
| 217 | iface = IECore.IndexedIO.create( os.path.join( "test", "CompoundData.fio" ), IECore.IndexedIO.OpenMode.Write ) |
| 218 | |
| 219 | v1 = IECore.CompoundData() |
| 220 | v1["0"] = IECore.FloatData(1.2) |
| 221 | v1["1"] = IECore.FloatData(2.3) |
| 222 | v1["2"] = IECore.FloatData(3) |
| 223 | v1["some:data"] = IECore.FloatData(3) |
| 224 | self.assertTrue(v1["0"] == IECore.FloatData(1.2)) |
| 225 | |
| 226 | v1.save( iface, "test" ) |
| 227 | |
| 228 | v2 = IECore.Object.load( iface, "test" ) |
| 229 | self.assertEqual( v1, v2 ) |
| 230 | |
| 231 | def testRepr(self): |
| 232 | """Test repr""" |
nothing calls this directly
no test coverage detected