MCPcopy Create free account
hub / github.com/ImageEngine/cortex / testSimpleIO

Method testSimpleIO

test/IECore/ObjectIO.py:43–58  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

41class TestObjectIO( unittest.TestCase ) :
42
43 def testSimpleIO( self ) :
44
45 iface = IECore.IndexedIO.create( os.path.join( "test", "o.fio" ), [], IECore.IndexedIO.OpenMode.Write )
46
47 o = IECore.IntData( 1 )
48 self.assertEqual( o.value, 1 )
49 o.save( iface, "test" )
50 oo = IECore.Object.load( iface, "test" )
51 self.assertEqual( o.value, oo.value );
52
53 o = IECore.StringData( "hello" )
54 self.assertEqual( o.value, "hello" )
55 o.save( iface, "test" )
56 oo = IECore.Object.load( iface, "test" )
57 self.assertEqual( o.value, oo.value );
58 self.assertEqual( o, oo );
59
60 def testSimpleArrayIO( self ) :
61

Callers

nothing calls this directly

Calls 4

joinMethod · 0.80
createMethod · 0.45
saveMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected