#NEWLINE# def test_yaml_setup( self ) : #NEWLINE# #INDENT# '\n        Uses YAML file for cluster configuration if option given.\n\n        This is true even if the environment contains a valid configuration.\n        ' #NEWLINE# tmpdir = tempfile . mkdtemp ( ) #NEWLINE# self . addCleanup ( shutil . rmtree , tmpdir ) #NEWLINE# with open ( os . path . join ( tmpdir , 'cluster.yml' ) , 'wt' ) as f : #NEWLINE# #INDENT# f . write ( _CLUSTER_YAML_CONTENTS ) #NEWLINE# #UNINDENT# options = BenchmarkOptions ( ) #NEWLINE# options . parseOptions ( [ '--cluster' , tmpdir ] ) #NEWLINE# cluster = get_cluster ( options , self . environ ) #NEWLINE# self . assertEqual ( cluster . control_node_address ( ) , IPAddress ( _YAML_CONTROL_SERVICE_ADDRESS ) )