#NEWLINE# def _create_test_config_file( self , conf_values_to_set = None ) : #NEWLINE# #INDENT# '\n        Create a temporary conf file just for this test.\n\n        :return: The path to the conf file\n        :rtype: str\n        ' #NEWLINE# repo_dir = path . dirname ( path . dirname ( path . dirname ( path . dirname ( path . realpath ( __file__ ) ) ) ) ) #NEWLINE# self . _conf_template_path = path . join ( repo_dir , 'conf' , 'default_clusterrunner.conf' ) #NEWLINE# test_conf_file_path = tempfile . NamedTemporaryFile ( ) . name #NEWLINE# shutil . copy ( self . _conf_template_path , test_conf_file_path ) #NEWLINE# os . chmod ( test_conf_file_path , ConfigFile . CONFIG_FILE_MODE ) #NEWLINE# conf_file = ConfigFile ( test_conf_file_path ) #NEWLINE# conf_values_to_set = ( conf_values_to_set or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# for ( conf_key , conf_value ) in conf_values_to_set . items ( ) : #NEWLINE# #INDENT# conf_file . write_value ( conf_key , conf_value , BASE_CONFIG_FILE_SECTION ) #NEWLINE# #UNINDENT# return test_conf_file_path