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

Method testImperfectMultiples

test/IECore/FileSequence.py:99–110  ·  view source on GitHub ↗

It was getting a bit annoying being forced to make the ranges a perfect multiple of the step.

( self )

Source from the content-addressed store, hash-verified

97 self.assertEqual( r.step, 2 )
98
99 def testImperfectMultiples( self ) :
100
101 """It was getting a bit annoying being forced to make the ranges a perfect multiple of the step."""
102
103 r = IECore.FrameRange( 1, 10, 2 )
104 self.assertEqual( r.asList(), [ 1, 3, 5, 7, 9 ] )
105 self.assertEqual( str( r ), "1-10x2" )
106
107 r = IECore.FrameList.parse( "1-100x10" )
108 self.assertEqual( r, IECore.FrameRange( 1, 100, 10 ) )
109 self.assertEqual( r.asList(), [ 1, 11, 21, 31, 41, 51, 61, 71, 81, 91 ] )
110 self.assertEqual( str( r ), "1-100x10" )
111
112 def testClumping( self ) :
113

Callers

nothing calls this directly

Calls 4

asListMethod · 0.95
FrameRangeMethod · 0.80
strFunction · 0.50
parseMethod · 0.45

Tested by

no test coverage detected