#NEWLINE# def testSpacesInContext( self ) : #NEWLINE# #INDENT# s = Gaffer . ScriptNode ( ) #NEWLINE# s [ 'n' ] = GafferDispatchTest . TextWriter ( ) #NEWLINE# s [ 'n' ] [ 'fileName' ] . setValue ( '/tmp/dispatcherTest/test.txt' ) #NEWLINE# s [ 'n' ] [ 'text' ] . setValue ( '${test}' ) #NEWLINE# dispatcher = GafferDispatch . Dispatcher . create ( 'LocalTest' ) #NEWLINE# dispatcher [ 'executeInBackground' ] . setValue ( True ) #NEWLINE# c = Gaffer . Context ( ) #NEWLINE# c [ 'test' ] = 'i am a string with spaces' #NEWLINE# with c : #NEWLINE# #INDENT# dispatcher . dispatch ( [ c [ 'n' ] ] ) #NEWLINE# #UNINDENT# dispatcher . jobPool ( ) . waitForAll ( ) #NEWLINE# text = '' . join ( open ( '/tmp/dispatcherTest/test.txt' ) . readlines ( ) ) #NEWLINE# self . assertEqual ( text , 'i am a string with spaces' )