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

Method testDelSpecialIndices

test/IECore/ObjectVectorTest.py:147–163  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

145 self.assertRaises( ValueError, o.index, m1 )
146
147 def testDelSpecialIndices( self ) :
148
149 m1 = IECore.IntData( 1 )
150 m2 = IECore.IntData( 2 )
151 m3 = IECore.IntData( 3 )
152
153 o = IECore.ObjectVector()
154 o.append( m1 )
155 o.append( m2 )
156 o.append( m3 )
157
158 del o[-1]
159
160 self.assertEqual( len( o ), 2 )
161 self.assertTrue( m1 in o )
162 self.assertTrue( m2 in o )
163 self.assertFalse( m3 in o )
164
165 def testConstructFromSequence( self ) :
166

Callers

nothing calls this directly

Calls 3

ObjectVectorMethod · 0.80
appendMethod · 0.80
lenFunction · 0.50

Tested by

no test coverage detected