def make_loc_files(file_creator, size=None):
 if size:
  body = ('*' * size)
 else:
  body = 'This is a test.'
 filename1 = file_creator.create_file(os.path.join('some_directory', 'text1.txt'), body)
 filename2 = file_creator.create_file(os.path.join('some_directory', 'another_directory', 'text2.txt'), body)
 filename1 = six.text_type(filename1)
 filename2 = six.text_type(filename2)
 return [filename1, filename2, os.path.dirname(filename2), os.path.dirname(filename1)]

def make_loc_files ( file_creator , size = None ) : if size : body = ( '*' * size ) else : body = 'This is a test.' filename1 = file_creator . create_file ( os . path . join ( 'some_directory' , 'text1.txt' ) , body ) filename2 = file_creator . create_file ( os . path . join ( 'some_directory' , 'another_directory' , 'text2.txt' ) , body ) filename1 = six . text_type ( filename1 ) filename2 = six . text_type ( filename2 ) return [ filename1 , filename2 , os . path . dirname ( filename2 ) , os . path . dirname ( filename1 ) ]
this sets up the test by making a directory named some_directory .