(sample_lines, line_num, file_name)
Generate a mock text file for test.
Generate a mock text file for test.
Generate a mock text file for test .
def mock_a_text_file(sample_lines, line_num, file_name):
  """Generate a mock text file for test."""
  with open(file_name, "w", encoding="utf-8") as f:
    lines = random_upsampling(sample_lines, line_num)
    for line in lines:
      f.write(line + "\n")
def mock_a_text_file ( sample_lines , line_num , file_name ) : with open ( file_name , "w" , encoding = "utf-8" ) as f : lines = random_upsampling ( sample_lines , line_num ) for line in lines : f . write ( line + "\n" )