#NEWLINE# def test_same_key_scheduled_twice_is_error( self ) : #NEWLINE# #INDENT# with self . assertRaises ( JobExistsError ) as cm : #NEWLINE# #INDENT# ExecutionGraph ( [ self . job ( 'Same' , passing_fn , [ ] ) , self . job ( 'Same' , passing_fn , [ ] ) ] ) #NEWLINE# #UNINDENT# self . assertEqual ( "Unexecutable graph: Job already scheduled u'Same'" , str ( self . exception ) )