#NEWLINE# def testFrameOrderWithPostTask( self ) : #NEWLINE# #INDENT# s = Gaffer . ScriptNode ( ) #NEWLINE# log = [ ] #NEWLINE# s [ 'p' ] = GafferDispatchTest . LoggingExecutableNode ( log = log ) #NEWLINE# s [ 'p' ] [ 'f' ] = Gaffer . StringPlug ( defaultValue = '####' ) #NEWLINE# s [ 't' ] = GafferDispatchTest . LoggingExecutableNode ( log = log ) #NEWLINE# s [ 't' ] [ 'postTasks' ] [ 0 ] . setInput ( s [ 'p' ] [ 'task' ] ) #NEWLINE# s [ 't' ] [ 'f' ] = Gaffer . StringPlug ( defaultValue = '####' ) #NEWLINE# dispatcher = GafferDispatch . Dispatcher . create ( 'testDispatcher' ) #NEWLINE# dispatcher [ 'framesMode' ] . setValue ( GafferDispatch . Dispatcher . FramesMode . CustomRange ) #NEWLINE# dispatcher [ 'frameRange' ] . setValue ( '1-4' ) #NEWLINE# dispatcher . dispatch ( [ s [ 't' ] ] ) #NEWLINE# self . assertEqual ( [ l . node for l in self ] , ( [ s [ 't' ] , s [ 'p' ] ] * 4 ) ) #NEWLINE# self . assertEqual ( [ l . context . getFrame ( ) for l in log ] , [ 1 , 1 , 2 , 2 , 3 , 3 , 4 , 4 ] )